|
|
@@ -829,4 +829,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and fs_user_id is not null and company_user_id is not null and qw_user_id is not null
|
|
|
limit 1
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectRepeatRecordList" resultType="com.fs.qw.vo.QwRepeatRecordListVO">
|
|
|
+ select ec.corp_id as corpId,
|
|
|
+ ec.external_user_id as externalUserId,
|
|
|
+ ec.name as externalUserName,
|
|
|
+ qu.qw_user_id as qwUserId,
|
|
|
+ qu.qw_user_name as qwUserName,
|
|
|
+ qd.dept_name as deptName,
|
|
|
+ ec.create_time as createTime,
|
|
|
+ ec.register_time as registerTime
|
|
|
+ from qw_external_contact ec
|
|
|
+ left join qw_user qu on ec.user_id = qu.qw_user_id and qu.corp_id = ec.corp_id
|
|
|
+ left join qw_dept qd on qd.dept_id = qu.department and qd.corp_id = qu.corp_id
|
|
|
+ <where>
|
|
|
+ ec.corp_id = #{corpId}
|
|
|
+ and ec.external_user_id = #{externalUserId}
|
|
|
+ <if test="qwUserId != null and qwUserId != ''">
|
|
|
+ and ec.user_id = #{qwUserId}
|
|
|
+ </if>
|
|
|
+ <if test="qwUserName != null and qwUserName != ''">
|
|
|
+ and qu.qw_user_name like concat('%', #{qwUserName}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by ec.create_time desc
|
|
|
+ </select>
|
|
|
</mapper>
|