feat: 机构关联关联角色
This commit is contained in:
@@ -152,10 +152,10 @@
|
||||
<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
|
||||
WHERE ts_position_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
|
||||
LEFT JOIN ts_user_role on ts_user.USID = ts_user_role.user_id
|
||||
WHERE ts_user_role.role_id in (
|
||||
SELECT ts_user_role.role_id from ts_user_role
|
||||
WHERE ts_user_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
|
||||
<if test="null != role.userId and role.userId != ''">
|
||||
and ts_user.USID like concat(concat('%',#{role.userId}),'%')
|
||||
</if>
|
||||
@@ -174,10 +174,10 @@
|
||||
<select id="selectUserByRoleByPage" resultMap="UserPosition">
|
||||
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
|
||||
WHERE ts_position_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
|
||||
LEFT JOIN ts_user_role on ts_user.USID = ts_user_role.user_id
|
||||
WHERE ts_user_role.role_id in (
|
||||
SELECT ts_user_role.role_id from ts_user_role
|
||||
WHERE ts_user_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
|
||||
<if test="null != role.userId and role.userId != ''">
|
||||
and ts_user.USID like concat(concat('%',#{role.userId}),'%')
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user