‘linchangsheng’ 3 hete
szülő
commit
be22d72e0f

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

@@ -51,10 +51,17 @@ public class AdminDeptLogic {
 
     public List<AdminDeptTree> tree(HttpServletRequest request) {
         final AdminUserCom adminUser = commonLogic.getAdminUser();
-
-        List<AdminDept> list = adminDeptService.lambdaQuery()
+        List<AdminDept> list = new ArrayList<>();
+        if (!adminUser.getType().equals(0) ){
+            list = adminDeptService.lambdaQuery()
                     .in(CollectionUtil.isNotEmpty(adminUser.getAdminCompanyIds()), AdminDept::getCompanyWechatId, adminUser.getAdminCompanyIds())
                     .list();
+        }else{
+            list = adminDeptService.lambdaQuery()
+                    .in(CollectionUtil.isNotEmpty(adminUser.getAdminCompanyIds()), AdminDept::getCompanyWechatId, adminUser.getCompanyWechatId())
+                    .eq(AdminDept::getAdminDeptId, "1")
+                    .list();
+        }
 
 
         List<AdminDeptTree> trees = new ArrayList<>();