|
@@ -104,15 +104,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="canExam != null and canExam == 1 ">
|
|
<if test="canExam != null and canExam == 1 ">
|
|
and us.subscribe_status = 1
|
|
and us.subscribe_status = 1
|
|
</if>
|
|
</if>
|
|
- <if test="searchKey != null and searchKey != '' ">
|
|
|
|
|
|
+ <if test="searchKey != null and searchKey != '' and searchType == 0 ">
|
|
and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
|
|
and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
|
|
</if>
|
|
</if>
|
|
- <if test="idCards != null and idCards.size()!=0 ">
|
|
|
|
|
|
+ <if test="idCards != null and idCards.size()!=0 and searchType == 0" >
|
|
AND u.id_card in
|
|
AND u.id_card in
|
|
<foreach collection="idCards" item="item" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="idCards" item="item" index="index" open="(" close=")" separator=",">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="searchType == 1" >
|
|
|
|
+ and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%') or
|
|
|
|
+ u.id_card in
|
|
|
|
+ <foreach collection="idCards" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>)
|
|
|
|
+ </if>
|
|
<if test="userId != null and userId != '' ">
|
|
<if test="userId != null and userId != '' ">
|
|
and us.user_id = #{userId}
|
|
and us.user_id = #{userId}
|
|
</if>
|
|
</if>
|