|
@ -76,16 +76,16 @@ public class RoleServiceImpl implements RoleService { |
|
|
if (roleVo.getMarket() == null || roleVo.getMarket().isEmpty()) { |
|
|
if (roleVo.getMarket() == null || roleVo.getMarket().isEmpty()) { |
|
|
return Result.error("所属市场为空"); |
|
|
return Result.error("所属市场为空"); |
|
|
} |
|
|
} |
|
|
if (roleVo.getFatherId() != null) { |
|
|
|
|
|
if (roleVo.getFatherId() != 2) { |
|
|
|
|
|
for (Integer menuId : roleVo.getMenuIds()) { |
|
|
|
|
|
if (menuId == 9) { |
|
|
|
|
|
return Result.error("上级角色非管理员用户不能赋予权限管理"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (roleVo.getFatherId() == null || roleVo.getFatherId() != 2) { |
|
|
|
|
|
for (Integer menuId : roleVo.getMenuIds()) { |
|
|
|
|
|
if (menuId == 9) { |
|
|
|
|
|
return Result.error("上级角色非管理员用户不能赋予权限管理"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
roleMapper.addRole(roleVo); |
|
|
roleMapper.addRole(roleVo); |
|
|