角色管理查看人员增加部门显示-后台代码

This commit is contained in:
yuezhihang
2022-03-23 17:40:11 +08:00
parent 9b2b957335
commit 461caf2105
2 changed files with 4 additions and 1 deletions
@@ -54,6 +54,7 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
public List<TsRole> getAll() {
QueryWrapper<TsRole> tsRoleQueryWrapper=new QueryWrapper<>();
tsRoleQueryWrapper.eq("ROLE_HIERARCHY",1);
tsRoleQueryWrapper.orderByDesc("NAME");
List<TsRole> rootRole=tsRoleDao.selectList(tsRoleQueryWrapper);
for(TsRole tsRole:rootRole){
tsRole.setChildren(recursionGetRole(tsRole));
@@ -70,6 +71,7 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
QueryWrapper<TsRole> tsRoleQueryWrapper=new QueryWrapper<>();
tsRoleQueryWrapper.eq("parent_id",tsRole.getId());
tsRoleQueryWrapper.eq("ROLE_HIERARCHY",tsRole.getRoleHierarchy()+1);
tsRoleQueryWrapper.orderByDesc("NAME");
List<TsRole> tsRoles=tsRoleDao.selectList(tsRoleQueryWrapper);
for(TsRole tsRoleNode:tsRoles){
tsRoleNode.setChildren(recursionGetRole(tsRoleNode));
@@ -143,7 +143,8 @@
</select>
<select id="selectUserByRoleByPage" resultMap="UserPosition">
SELECT ts_user.UNAME,ts_user.USID from ts_user
SELECT ts_user.UNAME,ts_user.USID,ts_user.INSTITUTION_ID , ts_institution.name as institution_name from ts_user
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
LEFT JOIN ts_user_position on ts_user.USID = ts_user_position.user_id
WHERE ts_user_position.position_id in (
SELECT ts_position_role.position_id from ts_position_role