puzhibing
2026-05-22 6912e074af61b73307d2fc31b1b8f4974f5eb4f3
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.ruoyi.account.mapper.TAppUserWhitelistMapper">
 
    <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserWhitelist">
        <id column="id" property="id" />
        <result column="app_user_id" property="appUserId" />
        <result column="phone" property="phone" />
        <result column="benefit_type" property="benefitType" />
        <result column="scope_type" property="scopeType" />
        <result column="partner_id" property="partnerId" />
        <result column="status" property="status" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="remark" property="remark" />
        <result column="del_flag" property="delFlag" />
    </resultMap>
 
    <sql id="Base_Column_List">
        id, app_user_id, phone, benefit_type, scope_type, partner_id, status, create_by, create_time, update_by, update_time, remark, del_flag
    </sql>
 
    <select id="selectValidByPhone" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from t_app_user_whitelist
        where phone = #{phone} and del_flag = 0
        limit 1
    </select>
 
    <update id="updateByIdIgnoreLogic">
        update t_app_user_whitelist
        <set>
            app_user_id = #{appUserId},
            phone = #{phone},
            benefit_type = #{benefitType},
            scope_type = #{scopeType},
            partner_id = #{partnerId},
            status = #{status},
            update_by = #{updateBy},
            update_time = now(),
            remark = #{remark},
            del_flag = #{delFlag}
        </set>
        where id = #{id}
    </update>
</mapper>