|
|
@@ -335,10 +335,10 @@ public class BCorpsController extends BladeController {
|
|
|
.like(ObjectUtils.isNotNull(bCorps.getTel()), BCorps::getTel, bCorps.getTel())
|
|
|
.like(ObjectUtils.isNotNull(bCorps.getAdminProfiles()), BCorps::getAdminProfiles, bCorps.getAdminProfiles())
|
|
|
.apply(ObjectUtils.isNotNull(bCorps.getCorpType()), "find_in_set('" + bCorps.getCorpType() + "',corp_type)");
|
|
|
- if (AuthUtil.getUserRole().contains("admin") || AuthUtil.getUserRole().contains("secondaryAdmin")) {
|
|
|
- //管理员、次级管理员查看全部数据
|
|
|
+ if (!AuthUtil.getUserRole().contains("总部") && !AuthUtil.getUserRole().contains("admin")) {
|
|
|
+ lambdaQueryWrapper.apply("(find_in_set('" + AuthUtil.getDeptId() + "',branch_id) or branch_id is null)");
|
|
|
} else {
|
|
|
- lambdaQueryWrapper.apply("find_in_set('" + AuthUtil.getDeptId() + "',branch_id)");
|
|
|
+ lambdaQueryWrapper.eq(ObjectUtils.isNotNull(bCorps.getBranchId()), BCorps::getBranchId, bCorps.getBranchId());
|
|
|
}
|
|
|
lambdaQueryWrapper.orderByDesc(BCorps::getCreateTime);
|
|
|
List<BCorps> bCorpsList = bCorpsService.list(lambdaQueryWrapper);
|