bug: 修改人员同步接口,去除已离职人员

This commit is contained in:
wxyclub
2023-11-12 14:27:07 +08:00
parent 01d21ba446
commit 458159edd4
2 changed files with 24 additions and 1 deletions
@@ -47,6 +47,7 @@
<select id="selectPreviousInstitution" resultMap="TsUser">
select * from ts_user
<where>
STATE = '1' and VALID_FLAG = '0' and DISABLE_FLAG = '0'
<if test="userName != null and userName != '' ">
( ts_user.ACCOUNT like concat(concat('%',#{userName}),'%') or ts_user.UNAME like concat(concat('%',#{userName}),'%') )
</if>
@@ -96,7 +97,8 @@
from ts_user
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
WHERE institution_id=#{institutionId}
WHERE ts_user.STATE = '1' and ts_user.VALID_FLAG = '0' and ts_user.DISABLE_FLAG = '0'
and institution_id=#{institutionId}
<if test="userName != null and userName != '' ">
and ( ts_user.ACCOUNT like concat(concat('%',#{userName}),'%') or ts_user.UNAME like concat(concat('%',#{userName}),'%') )
</if>