|
@@ -749,7 +749,7 @@ public class AdminUserLogic {
|
|
|
if (adminUser.getUserName().equals("admin")) {
|
|
|
return this.queryAdminModuleTree(null, true, null, null);
|
|
|
} else {
|
|
|
- return this.queryAdminModuleTree(adminUser.getRoleId(), false, null, null);
|
|
|
+ return this.queryAdminModuleTree(adminUser.getRoleId(), false, null, adminUser);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -864,28 +864,30 @@ public class AdminUserLogic {
|
|
|
adminModuleTree.setChildren(this.treeModule(trees, adminModuleTree.getModuleId(), hasModule, admin, false));
|
|
|
}
|
|
|
// 检查用户绑定网点是否为二级网点
|
|
|
- final List<AdminUserWebsitRela> relas = adminUserWebsitRelaService.lambdaQuery()
|
|
|
- .eq(AdminUserWebsitRela::getAdminUserId, adminUser.getAdminUserId())
|
|
|
- .list();
|
|
|
- if (CollectionUtil.isNotEmpty(relas) && relas.size() == 1) {
|
|
|
- final AdminUserWebsitRela rela = relas.get(0);
|
|
|
- final AdminWebsit websit = adminWebsitService.lambdaQuery()
|
|
|
- .eq(AdminWebsit::getWebsitId, rela.getAdminWebsitId())
|
|
|
- .one();
|
|
|
- if (websit.getLevel() == 2) {
|
|
|
- Integer existCount = websitContractSignRecordService.lambdaQuery()
|
|
|
- .eq(WebsitContractSignRecord::getWebsitId, websit.getWebsitId())
|
|
|
- .eq(WebsitContractSignRecord::getStatus, SignContractStatusEnum.OK.getKey())
|
|
|
- .ge(WebsitContractSignRecord::getSignOverTime, DateUtil.formatDateTime(DateUtil.date()))
|
|
|
- .count();
|
|
|
- // 没有签成功并且审核通过未过期的记录,只有签约菜单
|
|
|
- if (existCount == 0 && CollectionUtil.isNotEmpty(trees)) {
|
|
|
- List<AdminModuleTree> filterTree = trees.stream().filter(v -> v.getLevel() == 1 && v.getNotSign()).collect(Collectors.toList());
|
|
|
- if (CollectionUtil.isNotEmpty(filterTree)) {
|
|
|
- for (AdminModuleTree moduleTree : filterTree) {
|
|
|
- moduleTree.setChildren(this.treeModule(trees, moduleTree.getModuleId(), hasModule, admin, true));
|
|
|
+ if (Objects.nonNull(adminUser)) {
|
|
|
+ final List<AdminUserWebsitRela> relas = adminUserWebsitRelaService.lambdaQuery()
|
|
|
+ .eq(AdminUserWebsitRela::getAdminUserId, adminUser.getAdminUserId())
|
|
|
+ .list();
|
|
|
+ if (CollectionUtil.isNotEmpty(relas) && relas.size() == 1) {
|
|
|
+ final AdminUserWebsitRela rela = relas.get(0);
|
|
|
+ final AdminWebsit websit = adminWebsitService.lambdaQuery()
|
|
|
+ .eq(AdminWebsit::getWebsitId, rela.getAdminWebsitId())
|
|
|
+ .one();
|
|
|
+ if (websit.getLevel() == 2) {
|
|
|
+ Integer existCount = websitContractSignRecordService.lambdaQuery()
|
|
|
+ .eq(WebsitContractSignRecord::getWebsitId, websit.getWebsitId())
|
|
|
+ .eq(WebsitContractSignRecord::getStatus, SignContractStatusEnum.OK.getKey())
|
|
|
+ .ge(WebsitContractSignRecord::getSignOverTime, DateUtil.formatDateTime(DateUtil.date()))
|
|
|
+ .count();
|
|
|
+ // 没有签成功并且审核通过未过期的记录,只有签约菜单
|
|
|
+ if (existCount == 0 && CollectionUtil.isNotEmpty(trees)) {
|
|
|
+ List<AdminModuleTree> filterTree = trees.stream().filter(v -> v.getLevel() == 1 && v.getNotSign()).collect(Collectors.toList());
|
|
|
+ if (CollectionUtil.isNotEmpty(filterTree)) {
|
|
|
+ for (AdminModuleTree moduleTree : filterTree) {
|
|
|
+ moduleTree.setChildren(this.treeModule(trees, moduleTree.getModuleId(), hasModule, admin, true));
|
|
|
+ }
|
|
|
+ return filterTree;
|
|
|
}
|
|
|
- return filterTree;
|
|
|
}
|
|
|
}
|
|
|
}
|