Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Thinkingcao
silence-boot
提交
9668b612
silence-boot
项目概览
Thinkingcao
/
silence-boot
9 个月 前同步成功
通知
193
Star
63
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
silence-boot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9668b612
编写于
9月 09, 2019
作者:
T
Thinkingcao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新README文件
上级
aae0f9a9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
34 addition
and
10 deletion
+34
-10
silence-admin/src/main/java/com/silence/web/controller/business/BusinessContoller.java
...om/silence/web/controller/business/BusinessContoller.java
+34
-10
未找到文件。
silence-admin/src/main/java/com/silence/web/controller/business/BusinessContoller.java
浏览文件 @
9668b612
package
com.silence.web.controller.business
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.silence.common.core.domain.AjaxResult
;
import
com.silence.weixin.config.WxMpProperties
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.Map
;
/**
* @desc:
测试的Controller
* @desc: 测试的Controller
* @author: cao_wencao
* @date: 2019-08-28 16:48
*/
...
...
@@ -21,19 +25,39 @@ import java.util.Map;
@Api
(
value
=
"业务测试Controller"
)
@RequestMapping
(
value
=
"/business"
)
public
class
BusinessContoller
{
@RequestMapping
(
value
=
"/queryList"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
value
=
"查询List集合"
,
notes
=
"查询集合数据"
,
response
=
AjaxResult
.
class
,
httpMethod
=
"GET"
)
public
AjaxResult
queryList
(){
Map
<
String
,
String
>
mapData
=
Maps
.
newHashMap
();
@Autowired
private
WxMpProperties
wxMpProperties
;
@RequestMapping
(
value
=
"/queryList"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
value
=
"查询List集合"
,
notes
=
"查询集合数据"
,
response
=
AjaxResult
.
class
,
httpMethod
=
"GET"
)
public
AjaxResult
queryList
()
{
Map
<
String
,
String
>
mapData
=
Maps
.
newHashMap
();
mapData
.
put
(
"name"
,
"曹"
);
mapData
.
put
(
"sex"
,
"男"
);
mapData
.
put
(
"age"
,
"20"
);
return
AjaxResult
.
success
(
"查询用户集合成功"
,
mapData
);
mapData
.
put
(
"age"
,
"20"
);
return
AjaxResult
.
success
(
"查询用户集合成功"
,
mapData
);
}
@RequestMapping
(
value
=
"/getUser"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
value
=
"查询User"
,
notes
=
"查询用户"
,
response
=
AjaxResult
.
class
,
httpMethod
=
"GET"
)
public
String
getUser
(){
@RequestMapping
(
value
=
"/getUser"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
value
=
"查询User"
,
notes
=
"查询用户"
,
response
=
AjaxResult
.
class
,
httpMethod
=
"GET"
)
public
String
getUser
()
{
return
"宁浩"
;
}
@RequestMapping
(
value
=
"/getWxConfig"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
value
=
"查询微信配置"
,
notes
=
"查询微信数据"
,
response
=
AjaxResult
.
class
,
httpMethod
=
"GET"
)
public
AjaxResult
getWxConfig
()
{
Map
<
String
,
String
>
mapData
=
Maps
.
newHashMap
();
List
<
Map
>
result
=
Lists
.
newArrayList
();
final
List
<
WxMpProperties
.
MpConfig
>
configs
=
this
.
wxMpProperties
.
getConfigs
();
for
(
WxMpProperties
.
MpConfig
config
:
configs
)
{
mapData
.
put
(
"appId"
,
config
.
getAppId
());
mapData
.
put
(
"secret"
,
config
.
getSecret
());
mapData
.
put
(
"token"
,
config
.
getToken
());
mapData
.
put
(
"aesKey"
,
config
.
getAesKey
());
result
.
add
(
mapData
);
}
return
AjaxResult
.
success
(
"查询微信配置成功"
,
result
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录