xiaoyong931011
2021-07-21 1d03a9e224dc0ce11d47bede74da9db2189d663c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xzx.gc.user.mapper.UserVehicleRelMapper">
 
    <select id="queryCuserListByName" resultType="java.util.HashMap">
        SELECT a.user_id as userId,a.name FROM xzx_user_other_info a
        WHERE a.del_flag=0 and a.user_type=2
        and a.name is not null
        <if test=" partnerIds != null and partnerIds.size() != 0">
            and a.partner_id in
            <foreach collection="partnerIds" index="index" item="id" open="(" separator="," close=")">
                #{id}
            </foreach>
        </if>
        and a.user_id not in (select b.user_id from xzx_user_vehicle_rel b where b.del_flag=0
        <if test="userId != null and userId != ''">
            and b.user_id &lt;&gt; #{userId}
        </if>
        group by b.user_id)
    </select>
 
</mapper>