|
|
@ -54,6 +54,9 @@ public class RoleServiceImpl implements RoleService { |
|
|
|
if (roleVo.getPriority() == null) { |
|
|
|
return Result.error("优先级为空"); |
|
|
|
} |
|
|
|
if (roleVo.getPriority()<=0||roleVo.getPriority()>999) { |
|
|
|
return Result.error("优先级不在1-999"); |
|
|
|
} |
|
|
|
if (roleVo.getMenuIds() == null || roleVo.getMenuIds().isEmpty()) { |
|
|
|
return Result.error("权限为空"); |
|
|
|
} |
|
|
@ -96,6 +99,9 @@ public class RoleServiceImpl implements RoleService { |
|
|
|
if(roleVo.getId() == 2){ |
|
|
|
return Result.error("管理员不允许删除"); |
|
|
|
} |
|
|
|
if(roleVo.getId() == 1){ |
|
|
|
return Result.error("无用户不允许删除"); |
|
|
|
} |
|
|
|
try { |
|
|
|
roleMapper.deleteRoleMenu(roleVo); |
|
|
|
roleMapper.deleteRole(roleVo); |
|
|
|