|
@@ -52,14 +52,20 @@ public class AdminDeptLogic {
|
|
|
public List<AdminDeptTree> tree(HttpServletRequest request) {
|
|
|
final AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
List<AdminDept> list = new ArrayList<>();
|
|
|
- if (!adminUser.getType().equals(1) ){
|
|
|
+
|
|
|
+ List<Integer> types = new ArrayList<>();
|
|
|
+ types.add(0);
|
|
|
+ types.add(1);
|
|
|
+ types.add(3);
|
|
|
+
|
|
|
+
|
|
|
+ if (!types.contains(adminUser.getType()) ){
|
|
|
list = adminDeptService.lambdaQuery()
|
|
|
.in(CollectionUtil.isNotEmpty(adminUser.getAdminCompanyIds()), AdminDept::getCompanyId, adminUser.getAdminCompanyIds())
|
|
|
.eq(AdminDept::getPId, "1")
|
|
|
.list();
|
|
|
}else{
|
|
|
list = adminDeptService.lambdaQuery()
|
|
|
- .in(CollectionUtil.isNotEmpty(adminUser.getAdminCompanyIds()), AdminDept::getCompanyId, adminUser.getCompanyId())
|
|
|
.eq(AdminDept::getAdminDeptId, "1")
|
|
|
.list();
|
|
|
}
|
|
@@ -79,8 +85,10 @@ public class AdminDeptLogic {
|
|
|
}
|
|
|
|
|
|
private List<AdminDeptTree> treeModule(String adminDeptId) {
|
|
|
+ AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
//最父级资源树
|
|
|
List<AdminDept> collect = adminDeptService.lambdaQuery()
|
|
|
+ .in(CollectionUtil.isNotEmpty(adminUser.getAdminCompanyIds()), AdminDept::getCompanyId, adminUser.getAdminCompanyIds())
|
|
|
.eq(AdminDept::getPId, adminDeptId).list();
|
|
|
|
|
|
if (collect.size() == 0) {
|