RoleController.java
1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.bsth.controller.sys;
import java.util.Map;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.bsth.controller.BaseController;
import com.bsth.entity.sys.Role;
import com.bsth.service.sys.RoleService;
@RestController
@RequestMapping("role")
public class RoleController extends BaseController<Role, Integer>{
@Autowired
RoleService roleService;
/**
*
* @Title: settRoleModules
* @Description: TODO(为角色设置模块,全量覆盖)
* @param @param roleId 角色ID
* @param @param mIds 模块ID字符串(1,2,3,4)
* @throws
*/
@RequestMapping(value = "/settModules", method = RequestMethod.POST)
public Map<String, Object> settRoleModules(@RequestParam Integer roleId,@RequestParam String mIds){
return roleService.settRoleModules(roleId, mIds);
}
/**
*
* @Title: roleInfo
* @Description: TODO(角色信息)
* @param @param id 角色ID
* @throws
*/
@RequestMapping(value = "/roleInfo")
public Map<String, Object> roleInfo(@RequestParam Integer id){
return roleService.roleInfo(id);
}
/**
*
* @Title: settRoleModules
* @Description: TODO(为角色设置资源)
* @param @param roleId 角色ID
* @param @param mIds 模块ID字符串(1,2,3,4)
* @throws
*/
@RequestMapping(value = "/settResources",method = RequestMethod.POST)
public Map<String, Object> settResources(@RequestParam Integer roleId, @RequestParam String rIds){
return roleService.settRoleResources(roleId,rIds);
}
}