|
|
@@ -28,7 +28,7 @@ public class NewRoleApiController extends BaseApiController{
|
|
|
private NewRoleService newRoleService;
|
|
|
@Autowired
|
|
|
RoleMapper roleMapper;
|
|
|
-
|
|
|
+
|
|
|
@RequestMapping(value = "/roles", method = RequestMethod.POST)
|
|
|
public Result roles(RoleBo role, Integer pageNo,
|
|
|
Integer pageSize) {
|
|
|
@@ -36,7 +36,7 @@ public class NewRoleApiController extends BaseApiController{
|
|
|
res.setData(newRoleService.findRoles(role,pageNo,pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@RequestMapping(value = "/role/rolePermission", method = RequestMethod.POST)
|
|
|
public Result rolePermission(String id){
|
|
|
Result res = new Result();
|
|
|
@@ -80,7 +80,7 @@ public class NewRoleApiController extends BaseApiController{
|
|
|
public Result deleteRole(String data) {
|
|
|
Result res = new Result();
|
|
|
JSONArray ja = (JSONArray) JSON.parse(data);
|
|
|
-
|
|
|
+
|
|
|
if (ja != null && !ja.isEmpty()) {
|
|
|
List<String> records = new ArrayList<>();
|
|
|
for (int idx = 0; idx < ja.size(); idx++) {
|
|
|
@@ -145,14 +145,13 @@ public class NewRoleApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","角色资源不能为空"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
res.setData(newRoleService.addResources(rid, resources));
|
|
|
return res;
|
|
|
}
|
|
|
/**
|
|
|
* 角色资源详情
|
|
|
* @param rid 角色ID
|
|
|
- * @param resources 资源
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/role/ResourcesDetail", method = RequestMethod.POST)
|