|
@@ -578,7 +578,7 @@ public class AdminUserLogic {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public IPage<AdminUser> list(String companyWechatId, String companyWechatName, String roleId, Boolean status, String userName, Integer pageNum, Integer pageSize) {
|
|
|
+ public IPage<AdminUser> list(String companyWechatId, String companyWechatName, String roleId, Boolean status, String userName, Integer pageNum, Integer pageSize,String websitId) {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
|
|
|
if (adminUser.getType() != 2) {
|
|
@@ -588,6 +588,23 @@ public class AdminUserLogic {
|
|
|
// 网点主账号能看到账号
|
|
|
}
|
|
|
|
|
|
+ List<String> adminUserIds = new ArrayList<>();
|
|
|
+ if (!StringUtil.isEmpty(websitId)) {
|
|
|
+ List<String> adminUserIdList = adminUserWebsitRelaService.lambdaQuery().eq(AdminUserWebsitRela::getAdminWebsitId, websitId).select(AdminUserWebsitRela::getAdminUserId)
|
|
|
+ .list().stream().map(AdminUserWebsitRela::getAdminUserId).collect(Collectors.toList());
|
|
|
+ adminUserIds.addAll(adminUserIdList);
|
|
|
+
|
|
|
+ List<String> depts = adminDeptWebsitService.lambdaQuery().eq(AdminDeptWebsit::getWebsitId, websitId).select(AdminDeptWebsit::getAdminDeptId).list().stream()
|
|
|
+ .map(AdminDeptWebsit::getAdminDeptId).collect(Collectors.toList());
|
|
|
+ List<String> userIds = adminUserDeptRelaService.lambdaQuery().in(AdminUserDeptRela::getAdminDeptId, depts).select(AdminUserDeptRela::getAdminUserId).list().stream()
|
|
|
+ .map(AdminUserDeptRela::getAdminUserId).collect(Collectors.toList());
|
|
|
+ adminUserIds.addAll(userIds);
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(adminUserIdList))
|
|
|
+ return new Page<>();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
IPage<AdminUser> page = adminUserService.lambdaQuery()
|
|
|
.eq(StringUtils.isNotBlank(companyWechatId), AdminUser::getCompanyWechatId, companyWechatId)
|
|
|
.like(StringUtils.isNotBlank(companyWechatName), AdminUser::getCompanyName, companyWechatName)
|