From 4bc14961f05b8496b666d3d5ff5149826037bd19 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 3 Apr 2023 15:09:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java | 6 +++--- .../main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java index 61be8ef..8a3621d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java @@ -43,6 +43,9 @@ public class MenuManage { } public void parentMenuCheck(List pidList, List menuRoles, Set menuIds) { + if (pidList.isEmpty()) { + return; + } List menus = menuService.listByIds(pidList); if (menus.isEmpty()) { return; @@ -56,9 +59,6 @@ public class MenuManage { List tmpPidList = tmpSet.stream() .filter(pid -> !menuIds.contains(pid) && pid != BizConst.PARENT_ID) .collect(Collectors.toList()); - if (tmpPidList.isEmpty()) { - return; - } parentMenuCheck(tmpPidList, menuRoles, menuIds); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index 5f04246..3f951d4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -131,8 +131,7 @@ public class UserInfoManage { List userRoles = getUserRoleVOList(resListVO.getUserId()); resListVO.setUserRoleList(userRoles); LocalDateTime roleModifyTime; - if ((roleModifyTime = userRoles.get(userRoles.size() - 1).getCreateOn()).isAfter(resListVO.getUpdateTime()) - && CollUtil.isNotEmpty(userRoles)) { + if (CollUtil.isNotEmpty(userRoles) && (roleModifyTime = userRoles.get(userRoles.size() - 1).getCreateOn()).isAfter(resListVO.getUpdateTime())) { resListVO.setUpdateTime(roleModifyTime); } result.add(resListVO);