Helius
2021-06-16 4e51778362c2130598a4c73ec4cebe6629dbc53f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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.order.mapper.OtherUserMapper">
 
    <resultMap id="UserInfoMap" type="com.xzx.gc.model.user.UserInfoVo">
        <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
        <result column="user_type" jdbcType="VARCHAR" property="userType"/>
        <result column="user_id" jdbcType="INTEGER" property="userId"/>
        <result column="mobile_phone" jdbcType="VARCHAR" property="mobilePhone"/>
    </resultMap>
 
 
    <select id="queryUserOtherById" resultType="com.xzx.gc.model.admin.UserModel">
        select * from xzx_user_other_info where 1=1
        <if test="userId != null and userId != ''">
            and user_id=#{userId}
        </if>
    </select>
 
 
    <select id="queryCuserByTypeList" resultType="java.util.HashMap">
        SELECT *,partner_id as partnerId,mobile_phone as mobilePhone FROM xzx_user_other_info WHERE del_flag=0
        <if test="userType != null and userType != ''">
            AND user_type=#{userType}
        </if>
        <if test="phone != null and phone != ''">
            AND mobile_phone=#{phone}
        </if>
        <if test="nickName != null and nickName != ''">
            AND nick_name LIKE concat("%",#{nickName},"%")
        </if>
        <if test="partnerId != null and partnerId != ''">
            AND partner_id=#{partnerId}
        </if>
    </select>
 
    <select id="queryUserOtherApiById" resultType="com.xzx.gc.model.admin.UserModel">
        select * from xzx_user_other_info where del_flag = 0
        <if test="userId != null and userId != ''">
            and user_id=#{userId}
        </if>
        <if test="userType != null and userType != ''">
            and user_type=#{userType}
        </if>
        limit 1
    </select>
 
</mapper>