admin
2021-06-24 df4441322e9801c102299451da41d7c40b4502e9
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?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.ks.daylucky.mapper.UserInfoExtraMapper">
    <resultMap id="BaseResultMap" type="com.ks.daylucky.pojo.DO.UserInfoExtra">
        <id column="uid" property="uid" jdbcType="BIGINT"/>
        <result column="msg_setting" property="msgSetting" jdbcType="VARCHAR"/>
        <result column="msg_unread_count" property="msgUnreadCount" jdbcType="INTEGER"/>
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    </resultMap>
    <sql id="Base_Column_List">
    uid, msg_setting, msg_unread_count, create_time, update_time
  </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List"/>
        from user_info_extra
        where uid = #{0}
    </select>
 
    <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List"/>
        from user_info_extra
        where uid = #{0} for update
    </select>
 
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from user_info_extra
    where uid = #{0}
  </delete>
    <insert id="insert" parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
    insert into user_info_extra (uid, msg_setting, msg_unread_count, 
      create_time, update_time)
    values (#{uid,jdbcType=BIGINT}, #{msgSetting,jdbcType=VARCHAR}, #{msgUnreadCount,jdbcType=INTEGER}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
  </insert>
    <insert id="insertSelective"
            parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
        insert into user_info_extra
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="uid != null">
                uid,
            </if>
            <if test="msgSetting != null">
                msg_setting,
            </if>
            <if test="msgUnreadCount != null">
                msg_unread_count,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="updateTime != null">
                update_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="uid != null">
                #{uid,jdbcType=BIGINT},
            </if>
            <if test="msgSetting != null">
                #{msgSetting,jdbcType=VARCHAR},
            </if>
            <if test="msgUnreadCount != null">
                #{msgUnreadCount,jdbcType=INTEGER},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
        update user_info_extra
        <set>
            <if test="msgSetting != null">
                msg_setting = #{msgSetting,jdbcType=VARCHAR},
            </if>
            <if test="msgUnreadCount != null">
                msg_unread_count = #{msgUnreadCount,jdbcType=INTEGER},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateTime != null">
                update_time = #{updateTime,jdbcType=TIMESTAMP},
            </if>
        </set>
        where uid = #{uid,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
    update user_info_extra
    set msg_setting = #{msgSetting,jdbcType=VARCHAR},
      msg_unread_count = #{msgUnreadCount,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where uid = #{uid,jdbcType=BIGINT}
  </update>
</mapper>