‘linchangsheng’ 2 weeks ago
parent
commit
36c542bc32

+ 7 - 2
src/main/java/com/gree/mall/manager/logic/admin/AdminDeptLogic.java

@@ -53,10 +53,15 @@ public class AdminDeptLogic {
         final AdminUserCom adminUser = commonLogic.getAdminUser();
 
         List<AdminDept> list = adminDeptService.lambdaQuery()
-                    .in(CollectionUtil.isNotEmpty(adminUser.getAdminCompanyIds()), AdminDept::getCompanyWechatId, adminUser.getCompanyWechatId())
-                    .eq(AdminDept::getAdminDeptId, "1")
+                    .in(CollectionUtil.isNotEmpty(adminUser.getAdminCompanyIds()), AdminDept::getCompanyWechatId, adminUser.getAdminCompanyIds())
                     .list();
 
+
+        if (adminUser.getType().equals(0)) {
+            list.addAll(adminDeptService.lambdaQuery()
+                    .eq(AdminDept::getAdminDeptId, "1").list());
+        }
+
         List<AdminDeptTree> trees = new ArrayList<>();
         for (AdminDept adminDept : list) {
             AdminDeptTree adminDeptTree = new AdminDeptTree();