From 0bdc3fadeac004be93dba3d6d9e4b3ce9e55f5ea Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 22 Apr 2024 16:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hfkj/service/impl/SecMenuServiceImpl.java | 3 +++ .../main/java/com/hfkj/service/impl/SecUserServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/service/src/main/java/com/hfkj/service/impl/SecMenuServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/SecMenuServiceImpl.java index e2a46e3..0a13f29 100644 --- a/service/src/main/java/com/hfkj/service/impl/SecMenuServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/SecMenuServiceImpl.java @@ -166,6 +166,9 @@ public class SecMenuServiceImpl implements SecMenuService { if (secRole == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的角色"); } + // 记录更新时间 + secRoleService.editData(secRole); + // 删除角色权限旧数据 secRoleMenuRelService.deleteByRole(roleId); diff --git a/service/src/main/java/com/hfkj/service/impl/SecUserServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/SecUserServiceImpl.java index ab25176..af841cf 100644 --- a/service/src/main/java/com/hfkj/service/impl/SecUserServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/SecUserServiceImpl.java @@ -140,7 +140,7 @@ public class SecUserServiceImpl implements SecUserService { // 查询账户角色 SecRole role = secRoleService.getDetail(user.getRoleId()); if (role == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "登录账户角色不存在"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "登录账户角色不存在,请联系管理员进行分配"); } // 角色菜单 List menuTree = secMenuService.queryMenuTree(role.getId());