|
@@ -36,7 +36,8 @@ public class AdminRoleLogic {
|
|
/**
|
|
/**
|
|
* 角色列表
|
|
* 角色列表
|
|
*/
|
|
*/
|
|
- public IPage<AdminRole> listPage(HttpServletRequest request, String companyName, String adminCompanyId, Integer type, Integer pageNo, Integer pageSize) {
|
|
|
|
|
|
+ public IPage<AdminRole> listPage(HttpServletRequest request, String companyName, String adminCompanyId, Integer type,
|
|
|
|
+ Boolean canShow, Integer pageNo, Integer pageSize) {
|
|
AdminUserCom adminUser = commonLogic.getAdminUser(request);
|
|
AdminUserCom adminUser = commonLogic.getAdminUser(request);
|
|
List<String> companyIds = adminUser.getAdminCompanyIds();
|
|
List<String> companyIds = adminUser.getAdminCompanyIds();
|
|
|
|
|
|
@@ -48,7 +49,7 @@ public class AdminRoleLogic {
|
|
.eq(Objects.nonNull(type), AdminRole::getType, type)
|
|
.eq(Objects.nonNull(type), AdminRole::getType, type)
|
|
.ge(userType > 0, AdminRole::getType, userType)
|
|
.ge(userType > 0, AdminRole::getType, userType)
|
|
.and(CollectionUtils.isNotEmpty(companyIds), v -> {
|
|
.and(CollectionUtils.isNotEmpty(companyIds), v -> {
|
|
- if (!adminUser.getUserName().equals("admin") && adminUser.getType().equals(0)) {
|
|
|
|
|
|
+ if (!adminUser.getUserName().equals("admin") && adminUser.getType().equals(0) || canShow) {
|
|
v.in(CollectionUtils.isNotEmpty(companyIds), AdminRole::getCompanyId, companyIds)
|
|
v.in(CollectionUtils.isNotEmpty(companyIds), AdminRole::getCompanyId, companyIds)
|
|
.or()
|
|
.or()
|
|
.isNull(AdminRole::getCompanyId);
|
|
.isNull(AdminRole::getCompanyId);
|