无角色异常提示修改

master
cheney 2 years ago
parent 14ac468f8e
commit 5453a34d8f
  1. 1
      src/main/java/com/huoran/iasf/common/exception/code/BaseResponseCode.java
  2. 2
      src/main/java/com/huoran/iasf/service/impl/PermissionServiceImpl.java

@ -50,6 +50,7 @@ public enum BaseResponseCode implements ResponseCodeInterface {
OPERATION_MENU_PERMISSION_BTN_ERROR(401013, "操作后的菜单类型是按钮,所属菜单必须为菜单类型"),
OPERATION_MENU_PERMISSION_URL_NOT_NULL(401015, "菜单权限的url不能为空"),
OPERATION_MENU_PERMISSION_URL_PERMS_NULL(401016, "菜单权限的标识符不能为空"),
ROLE_ERROR(401017, "账号角色被删,请联系管理员添加角色后再试"),
EXCEL_FILE_NULL(40006, "导入失败,导入数据为空!")
;

@ -113,7 +113,7 @@ public class PermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysP
}
roleIds = roleIds.substring(0,roleIds.length()-1);
}else {
throw new BusinessException(BaseResponseCode.UNAUTHORIZED_ERROR);
throw new BusinessException(BaseResponseCode.ROLE_ERROR);
}
List<SysPermission> list = sysPermissionMapper.selectRoleMenu(roleIds);
return build(list);

Loading…
Cancel
Save