Merge branch 'dev-V0.4.5' of https://gitee.com/iotkit-open-source/iotkit-parent into dev-V0.4.5
commit
6c1bd70c8e
|
@ -135,7 +135,7 @@ public class SysMenuDataImpl implements ISysMenuData, IJPACommData<SysMenu, Long
|
|||
|
||||
@Override
|
||||
public List<String> selectMenuPermsByUserId(Long userId) {
|
||||
return jpaQueryFactory.select(Projections.bean(String.class, tbSysMenu.perms.countDistinct()))
|
||||
List<String> menuIds = jpaQueryFactory.select(tbSysMenu.perms)
|
||||
.from(tbSysMenu)
|
||||
.leftJoin(tbSysRoleMenu).on(tbSysMenu.id.eq(tbSysRoleMenu.menuId))
|
||||
.leftJoin(tbSysUserRole).on(tbSysRoleMenu.roleId.eq(tbSysUserRole.roleId))
|
||||
|
@ -145,6 +145,7 @@ public class SysMenuDataImpl implements ISysMenuData, IJPACommData<SysMenu, Long
|
|||
.and(tbSysRole.status.eq("0"))
|
||||
.and(tbSysUserRole.userId.eq(userId))
|
||||
.build()).fetch();
|
||||
return menuIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -144,7 +144,7 @@ public class SysRoleDataImpl implements ISysRoleData, IJPACommData<SysRole, Long
|
|||
}
|
||||
|
||||
private List<SysRole> buildQueryTitle(Predicate predicate) {
|
||||
return jpaQueryFactory.select(Projections.bean(SysRole.class, tbSysRole.id.countDistinct(), tbSysRole.roleName,
|
||||
return jpaQueryFactory.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)
|
||||
|
|
Loading…
Reference in New Issue