机构管理最新需求

This commit is contained in:
yuezhihang
2022-01-21 18:54:21 +08:00
parent 12ad84d7d6
commit 5d0df6d02c
5 changed files with 102 additions and 0 deletions
@@ -48,6 +48,49 @@
limit #{start},#{end}
</select>
<select id="userUnderInstitution" parameterType="com.adc.da.slrs.sarUser.entity.TsUser" resultMap="UserPosition">
select u.*,p.id p_id,p.name p_name from ts_user u
left join ts_user_position up
on u.usid=up.user_id
left join ts_position p
on up.position_id=p.id
where 1=1
<if test="TsUser.uname != null and TsUser.uname != '' ">
and u.uname like concat('%',#{TsUser.uname},'%')
</if>
<if test="TsUser.email != null and TsUser.email != '' ">
and u.email like concat('%',#{TsUser.email},'%')
</if>
<if test=" null != ids and ids.size()> 0">
and INSTITUTION_ID in
<foreach item="id" collection="ids" open="(" separator="," close=")" index="index">
#{id}
</foreach>
</if>
limit #{start},#{end}
</select>
<select id="userUnderInstitutionCount" resultType="java.lang.Integer">
select count(u.USID) from ts_user u
left join ts_user_position up
on u.usid=up.user_id
left join ts_position p
on up.position_id=p.id
where 1=1
<if test="TsUser.uname != null and TsUser.uname != '' ">
and u.uname like concat('%',#{TsUser.uname},'%')
</if>
<if test="TsUser.email != null and TsUser.email != '' ">
and u.email like concat('%',#{TsUser.email},'%')
</if>
<if test=" null != ids and ids.size()> 0">
and INSTITUTION_ID in
<foreach item="id" collection="ids" open="(" separator="," close=")" index="index">
#{id}
</foreach>
</if>
</select>
<select id="getUserAndPositionCount" parameterType="com.adc.da.slrs.sarUser.entity.TsUser" resultType="java.lang.Integer">
select count(u.USID) from ts_user u
left join ts_user_position up