Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -11,6 +11,10 @@ public class RoleUserDTO {
|
||||
// 要查询的角色
|
||||
private String roleId;
|
||||
|
||||
private String institutionName;
|
||||
|
||||
private String institutionId;
|
||||
|
||||
private long pageNumber;
|
||||
|
||||
private long pageSize;
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
</select>
|
||||
<select id="selectUserByRole" resultType="java.lang.Integer">
|
||||
SELECT count(ts_user.USID) 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
|
||||
@@ -139,11 +140,18 @@
|
||||
<if test="null != role.userName and role.userName != ''">
|
||||
and ts_user.UNAME like concat(concat('%',#{role.userName}),'%')
|
||||
</if>
|
||||
<if test="null != role.institutionName and role.institutionName != ''">
|
||||
and ts_institution.name like concat(concat('%',#{role.institutionName}),'%')
|
||||
</if>
|
||||
<if test="null != role.institutionId and role.institutionId != ''">
|
||||
and ts_user.INSTITUTION_ID = #{role.institutionId}
|
||||
</if>
|
||||
|
||||
</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
|
||||
@@ -154,6 +162,12 @@
|
||||
<if test="null != role.userName and role.userName != ''">
|
||||
and ts_user.UNAME like concat(concat('%',#{role.userName}),'%')
|
||||
</if>
|
||||
<if test="null != role.institutionName and role.institutionName != ''">
|
||||
and ts_institution.name like concat(concat('%',#{role.institutionName}),'%')
|
||||
</if>
|
||||
<if test="null != role.institutionId and role.institutionId != ''">
|
||||
and ts_user.INSTITUTION_ID = #{role.institutionId}
|
||||
</if>
|
||||
limit ${(role.pageNumber - 1) * role.pageSize},${role.pageSize}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user