|
@@ -616,27 +616,35 @@ public class AdminUserLogic {
|
|
|
.orderByDesc(AdminUser::getCompanyWechatId)
|
|
|
.orderByAsc(AdminUser::getCreateTime)
|
|
|
.page(new Page<>(pageNum, pageSize));
|
|
|
+ log.info("查询账户管理 {}", page);
|
|
|
|
|
|
- for (AdminUser record : page.getRecords()) {
|
|
|
- AdminUserWebsitRela adminUserWebsitRela = adminUserWebsitRelaService.lambdaQuery().eq(AdminUserWebsitRela::getAdminUserId, record.getAdminUserId()).last("limit 1").one();
|
|
|
-
|
|
|
- AdminUserDeptRela adminUserDeptRela = adminUserDeptRelaService.lambdaQuery().eq(AdminUserDeptRela::getAdminUserId, record.getAdminUserId()).last("limit 1").one();
|
|
|
+ if (CollectionUtil.isNotEmpty(page.getRecords())) {
|
|
|
+ for (AdminUser record : page.getRecords()) {
|
|
|
+ AdminUserWebsitRela adminUserWebsitRela = adminUserWebsitRelaService.lambdaQuery()
|
|
|
+ .eq(AdminUserWebsitRela::getAdminUserId, record.getAdminUserId())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
+ AdminUserDeptRela adminUserDeptRela = adminUserDeptRelaService.lambdaQuery()
|
|
|
+ .eq(AdminUserDeptRela::getAdminUserId, record.getAdminUserId())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
- if (adminUserDeptRela != null) {
|
|
|
+ if (adminUserDeptRela != null) {
|
|
|
|
|
|
- AdminDept adminDept = adminDeptService.getById(adminUserDeptRela.getAdminDeptId());
|
|
|
+ AdminDept adminDept = adminDeptService.getById(adminUserDeptRela.getAdminDeptId());
|
|
|
|
|
|
- record.setDeptWebsitName(adminDept.getDeptName());
|
|
|
+ record.setDeptWebsitName(adminDept.getDeptName());
|
|
|
|
|
|
- } else if (adminUserWebsitRela != null) {
|
|
|
+ } else if (adminUserWebsitRela != null) {
|
|
|
|
|
|
- AdminWebsit adminWebsit = adminWebsitService.getById(adminUserWebsitRela.getAdminWebsitId());
|
|
|
- if (adminWebsit != null)
|
|
|
- record.setDeptWebsitName(adminWebsit.getName());
|
|
|
- }
|
|
|
+ AdminWebsit adminWebsit = adminWebsitService.getById(adminUserWebsitRela.getAdminWebsitId());
|
|
|
+ if (adminWebsit != null)
|
|
|
+ record.setDeptWebsitName(adminWebsit.getName());
|
|
|
+ }
|
|
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|