|
@@ -1,10 +1,17 @@
|
1
|
1
|
package com.community.huiju.controller;
|
2
|
2
|
|
|
3
|
+import com.community.commom.mode.ResponseBean;
|
3
|
4
|
import com.community.huiju.common.base.BaseController;
|
|
5
|
+import com.community.huiju.service.IToSysRoleService;
|
4
|
6
|
import io.swagger.annotations.Api;
|
|
7
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
8
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
9
|
+import io.swagger.annotations.ApiOperation;
|
|
10
|
+import org.springframework.beans.factory.annotation.Autowired;
|
5
|
11
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
6
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
7
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
12
|
+import org.springframework.web.bind.annotation.*;
|
|
13
|
+
|
|
14
|
+import javax.servlet.http.HttpSession;
|
8
|
15
|
|
9
|
16
|
@RefreshScope
|
10
|
17
|
@RestController
|
|
@@ -12,6 +19,20 @@ import org.springframework.web.bind.annotation.RestController;
|
12
|
19
|
@Api(value = "运营角色 API", description = "运营角色 API")
|
13
|
20
|
public class SysRoleController extends BaseController {
|
14
|
21
|
|
|
22
|
+ @Autowired
|
|
23
|
+ private IToSysRoleService iToSysRoleService;
|
|
24
|
+
|
|
25
|
+ @RequestMapping(value = "/role/list", method = RequestMethod.POST)
|
|
26
|
+ @ApiOperation(value = "获取所有角色", notes = "获取所有角色")
|
|
27
|
+ @ApiImplicitParams({
|
|
28
|
+ @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "pageNum第几页;pageSize一页多少行;roleName角色名称(可选)")
|
|
29
|
+ })
|
|
30
|
+ public ResponseBean getRoleAll(@RequestBody String parameter,
|
|
31
|
+ HttpSession session){
|
|
32
|
+ ResponseBean responseBean = new ResponseBean();
|
|
33
|
+ responseBean = iToSysRoleService.getAll(parameter);
|
|
34
|
+ return responseBean;
|
|
35
|
+ }
|
15
|
36
|
|
16
|
37
|
|
17
|
38
|
}
|