admin
2019-11-23 51a4ff5d777028d52a19c314a99f796334cb7b51
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.yeshi.fanli.dao.mybatis.user.vip.UserVIPInfoMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo">
        <id column="uvi_uid" property="id" jdbcType="BIGINT" />
        <result column="uvi_state" property="state" jdbcType="INTEGER" />
        <result column="uvi_apply_time" property="applyTime" jdbcType="TIMESTAMP" />
        <result column="uvi_success_time" property="successTime"
            jdbcType="TIMESTAMP" />
        <result column="uvi_beizhu" property="beiZhu" jdbcType="VARCHAR" />
        <result column="uvi_create_time" property="createTime"
            jdbcType="TIMESTAMP" />
        <result column="uvi_update_time" property="updateTime"
            jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">uvi_uid,uvi_state,uvi_apply_time,uvi_success_time,uvi_beizhu,uvi_create_time,uvi_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_user_vip_info where uvi_uid = #{id,jdbcType=BIGINT}
    </select>
 
 
    <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_user_vip_info where uvi_uid = #{0} for update
    </select>
 
 
    <select id="listByUids" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_user_vip_info where
        <foreach collection="uidList" separator=" or " item="uid">
            uvi_uid=#{uid}
        </foreach>
 
    </select>
 
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_user_vip_info where uvi_uid = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_user_vip_info
        (uvi_uid,uvi_state,uvi_apply_time,uvi_success_time,uvi_beizhu,uvi_create_time,uvi_update_time)
        values
        (#{id,jdbcType=BIGINT},#{state,jdbcType=INTEGER},#{applyTime,jdbcType=TIMESTAMP},#{successTime,jdbcType=TIMESTAMP},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_user_vip_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">uvi_uid,</if>
            <if test="state != null">uvi_state,</if>
            <if test="applyTime != null">uvi_apply_time,</if>
            <if test="successTime != null">uvi_success_time,</if>
            <if test="beiZhu != null">uvi_beizhu,</if>
            <if test="createTime != null">uvi_create_time,</if>
            <if test="updateTime != null">uvi_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="state != null">#{state,jdbcType=INTEGER},</if>
            <if test="applyTime != null">#{applyTime,jdbcType=TIMESTAMP},</if>
            <if test="successTime != null">#{successTime,jdbcType=TIMESTAMP},</if>
            <if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo">update
        yeshi_ec_user_vip_info set uvi_state =
        #{state,jdbcType=INTEGER},uvi_apply_time =
        #{applyTime,jdbcType=TIMESTAMP},uvi_success_time =
        #{successTime,jdbcType=TIMESTAMP},uvi_beizhu =
        #{beiZhu,jdbcType=VARCHAR},uvi_create_time =
        #{createTime,jdbcType=TIMESTAMP},uvi_update_time =
        #{updateTime,jdbcType=TIMESTAMP} where uvi_uid =
        #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo">
        update yeshi_ec_user_vip_info
        <set>
            <if test="state != null">uvi_state=#{state,jdbcType=INTEGER},</if>
            <if test="applyTime != null">uvi_apply_time=#{applyTime,jdbcType=TIMESTAMP},</if>
            <if test="successTime != null">uvi_success_time=#{successTime,jdbcType=TIMESTAMP},
            </if>
            <if test="beiZhu != null">uvi_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="createTime != null">uvi_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">uvi_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where uvi_uid = #{id,jdbcType=BIGINT}
    </update>
</mapper>