‘linchangsheng’ 2 周之前
父节点
当前提交
be22d72e0f
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      src/main/java/com/gree/mall/manager/logic/admin/AdminDeptLogic.java

+ 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<>();