|
|
@@ -128,6 +128,12 @@ public class NewRoleApiController extends BaseApiController{
|
|
|
res.setData(newRoleService.bindUser(rid, uid));
|
|
|
return res;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 新增角色资源
|
|
|
+ * @param rid 角色ID
|
|
|
+ * @param resources 资源
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping(value = "/role/addResources", method = RequestMethod.POST)
|
|
|
public Result addResources(String rid, String resources) {
|
|
|
Result res = new Result();
|
|
|
@@ -139,27 +145,16 @@ public class NewRoleApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","角色资源不能为空"));
|
|
|
return res;
|
|
|
}
|
|
|
- if (newRoleService.checkRid(rid)) {
|
|
|
- res.getError().add(buildError("","角色资源已存在"));
|
|
|
- return res;
|
|
|
- }
|
|
|
+
|
|
|
res.setData(newRoleService.addResources(rid, resources));
|
|
|
return res;
|
|
|
}
|
|
|
- @RequestMapping(value = "/role/updateResources", method = RequestMethod.POST)
|
|
|
- public Result updateResources(String rid, String resources) {
|
|
|
- Result res = new Result();
|
|
|
- if (StringUtils.isBlank(rid)) {
|
|
|
- res.getError().add(buildError("","角色错误"));
|
|
|
- return res;
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(resources)) {
|
|
|
- res.getError().add(buildError("","角色资源不能为空"));
|
|
|
- return res;
|
|
|
- }
|
|
|
- res.setData(newRoleService.updateResources(rid, resources));
|
|
|
- return res;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 离职人员转交
|
|
|
+ * @param aid 离职ID
|
|
|
+ * @param transferId 转交ID
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping(value = "/role/dimission", method = RequestMethod.POST)
|
|
|
public Result dimission(String aid ,String transferId) {
|
|
|
Result res = new Result();
|