|
@@ -163,7 +163,8 @@ public class SysRoleDataImpl implements ISysRoleData, IJPACommData<SysRole, Long
|
|
|
}
|
|
|
|
|
|
private List<SysRole> buildQueryTitle(Predicate predicate) {
|
|
|
- return jpaQueryFactory.select(Projections.fields(SysRole.class, tbSysRole.id, tbSysRole.roleName,
|
|
|
+ return jpaQueryFactory.selectDistinct(tbSysRole.id)
|
|
|
+ .select(Projections.fields(SysRole.class, tbSysRole.id, tbSysRole.roleName,
|
|
|
tbSysRole.roleKey, tbSysRole.roleSort, tbSysRole.menuCheckStrictly, tbSysRole.deptCheckStrictly,
|
|
|
tbSysRole.status, tbSysRole.delFlag, tbSysRole.createTime, tbSysRole.remark))
|
|
|
.from(tbSysRole)
|
|
@@ -176,6 +177,7 @@ public class SysRoleDataImpl implements ISysRoleData, IJPACommData<SysRole, Long
|
|
|
|
|
|
private Predicate buildQueryWrapper(SysRole role) {
|
|
|
return PredicateBuilder.instance()
|
|
|
+ .and(tbSysRole.delFlag.eq(UserConstants.ROLE_NORMAL))
|
|
|
.and(Objects.nonNull(role.getId()), () -> tbSysRole.id.eq(role.getId()))
|
|
|
.and(StringUtils.isNotBlank(role.getRoleName()), () -> tbSysRole.roleName.like(role.getRoleName()))
|
|
|
.and(StringUtils.isNotBlank(role.getStatus()), () -> tbSysRole.roleName.eq(role.getStatus()))
|