|
@@ -46,7 +46,15 @@ public class AdminRoleLogic {
|
|
|
.eq(StringUtils.isNotBlank(companyWechatName), AdminRole::getCompanyName, companyWechatName)
|
|
|
.eq(StringUtils.isNotBlank(adminCompanyId), AdminRole::getCompanyId, adminCompanyId)
|
|
|
.eq(Objects.nonNull(type), AdminRole::getType, type)
|
|
|
- .in(CollectionUtils.isNotEmpty(companyIds), AdminRole::getCompanyId, companyIds)
|
|
|
+ .and(v -> {
|
|
|
+ if (!adminUser.getUserName().equals("admin") && adminUser.getType().equals(0)) {
|
|
|
+ v.in(CollectionUtils.isNotEmpty(companyIds), AdminRole::getCompanyId, companyIds)
|
|
|
+ .or()
|
|
|
+ .isNull(AdminRole::getCompanyId);
|
|
|
+ } else {
|
|
|
+ v.in(CollectionUtils.isNotEmpty(companyIds), AdminRole::getCompanyId, companyIds);
|
|
|
+ }
|
|
|
+ })
|
|
|
.ge(userType > 0, AdminRole::getType, userType)
|
|
|
.orderByAsc(AdminRole::getType)
|
|
|
.page(new Page<>(pageNo, pageSize));
|