‘linchangsheng’ 2 weeks ago
parent
commit
bed84d089d

+ 3 - 2
src/main/java/com/gree/mall/manager/logic/admin/AdminUserLogic.java

@@ -330,13 +330,14 @@ public class AdminUserLogic {
         AdminUserCom adminUser = commonLogic.getAdminUser(request);
 
         Set<String> adminUserIdList = new HashSet<>();
-        if (!adminUser.getUserName().equals("admin")) {
-            // 非admin账号,筛选能看的账号
+        if (!adminUser.getType().equals(0)) {
+            // 非平台账号,筛选能看的账号
             this.queryCanSeeAdminUser(adminUserIdList, adminUser);
         }
 
         IPage<AdminUser> page = adminUserService.lambdaQuery()
                 .in(CollectionUtil.isNotEmpty(adminUserIdList), AdminUser::getAdminUserId, adminUserIdList)
+                .ne(!adminUser.getUserName().equals("admin"), AdminUser::getUserName, "admin")
                 .eq(StringUtils.isNotEmpty(roleId), AdminUser::getRoleId, roleId)
                 .eq(status != null, AdminUser::getStatus, status)
                 .in(CollectionUtils.isNotEmpty(adminUser.getAdminCompanyIds()), AdminUser::getCompanyWechatId, adminUser.getAdminCompanyIds())