yujian
2019-08-27 d8359ddb48dab5cc797a9d552e11fde571f4920c
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?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.taobao.TaoBaoPunishOrderMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.taobao.TaoBaoPunishOrder">
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="relation_id" property="relationId" jdbcType="VARCHAR" />
        <result column="settle_month" property="settleMonth" jdbcType="VARCHAR" />
        <result column="punish_status" property="punishStatus"
            jdbcType="VARCHAR" />
        <result column="violation_type" property="violationType"
            jdbcType="VARCHAR" />
        <result column="tk_trade_create_time" property="tkTradeCreateTime"
            jdbcType="VARCHAR" />
        <result column="tb_trade_id" property="tbTradeId" jdbcType="VARCHAR" />
        <result column="tb_trade_parent_id" property="tbTradeParentId"
            jdbcType="VARCHAR" />
        <result column="tk_adzone_id" property="tkAdzoneId" jdbcType="VARCHAR" />
        <result column="tk_site_id" property="tkSiteId" jdbcType="VARCHAR" />
        <result column="tk_pub_id" property="tkPubId" jdbcType="VARCHAR" />
        <result column="special_id" property="specialId" jdbcType="VARCHAR" />
        <result column="union_id" property="unionId" jdbcType="VARCHAR" />
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">id,relation_id,settle_month,punish_status,violation_type,tk_trade_create_time,tb_trade_id,tb_trade_parent_id,tk_adzone_id,tk_site_id,tk_pub_id,special_id,union_id,create_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_taobao_punish_order where id = #{id,jdbcType=BIGINT}
    </select>
 
    <select id="selectByTradeId" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_taobao_punish_order where tb_trade_id = #{0}
    </select>
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_taobao_punish_order where id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoPunishOrder"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_taobao_punish_order
        (id,relation_id,settle_month,punish_status,violation_type,tk_trade_create_time,tb_trade_id,tb_trade_parent_id,tk_adzone_id,tk_site_id,tk_pub_id,special_id,union_id,create_time)
        values
        (#{id,jdbcType=BIGINT},#{relationId,jdbcType=VARCHAR},#{settleMonth,jdbcType=VARCHAR},#{punishStatus,jdbcType=VARCHAR},#{violationType,jdbcType=VARCHAR},#{tkTradeCreateTime,jdbcType=VARCHAR},#{tbTradeId,jdbcType=VARCHAR},#{tbTradeParentId,jdbcType=VARCHAR},#{tkAdzoneId,jdbcType=VARCHAR},#{tkSiteId,jdbcType=VARCHAR},#{tkPubId,jdbcType=VARCHAR},#{specialId,jdbcType=VARCHAR},#{unionId,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoPunishOrder"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_taobao_punish_order
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="relationId != null">relation_id,</if>
            <if test="settleMonth != null">settle_month,</if>
            <if test="punishStatus != null">punish_status,</if>
            <if test="violationType != null">violation_type,</if>
            <if test="tkTradeCreateTime != null">tk_trade_create_time,</if>
            <if test="tbTradeId != null">tb_trade_id,</if>
            <if test="tbTradeParentId != null">tb_trade_parent_id,</if>
            <if test="tkAdzoneId != null">tk_adzone_id,</if>
            <if test="tkSiteId != null">tk_site_id,</if>
            <if test="tkPubId != null">tk_pub_id,</if>
            <if test="specialId != null">special_id,</if>
            <if test="unionId != null">union_id,</if>
            <if test="createTime != null">create_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="relationId != null">#{relationId,jdbcType=VARCHAR},</if>
            <if test="settleMonth != null">#{settleMonth,jdbcType=VARCHAR},</if>
            <if test="punishStatus != null">#{punishStatus,jdbcType=VARCHAR},</if>
            <if test="violationType != null">#{violationType,jdbcType=VARCHAR},</if>
            <if test="tkTradeCreateTime != null">#{tkTradeCreateTime,jdbcType=VARCHAR},</if>
            <if test="tbTradeId != null">#{tbTradeId,jdbcType=VARCHAR},</if>
            <if test="tbTradeParentId != null">#{tbTradeParentId,jdbcType=VARCHAR},</if>
            <if test="tkAdzoneId != null">#{tkAdzoneId,jdbcType=VARCHAR},</if>
            <if test="tkSiteId != null">#{tkSiteId,jdbcType=VARCHAR},</if>
            <if test="tkPubId != null">#{tkPubId,jdbcType=VARCHAR},</if>
            <if test="specialId != null">#{specialId,jdbcType=VARCHAR},</if>
            <if test="unionId != null">#{unionId,jdbcType=VARCHAR},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoPunishOrder">update
        yeshi_ec_taobao_punish_order set relation_id =
        #{relationId,jdbcType=VARCHAR},settle_month =
        #{settleMonth,jdbcType=VARCHAR},punish_status =
        #{punishStatus,jdbcType=VARCHAR},violation_type =
        #{violationType,jdbcType=VARCHAR},tk_trade_create_time =
        #{tkTradeCreateTime,jdbcType=VARCHAR},tb_trade_id =
        #{tbTradeId,jdbcType=VARCHAR},tb_trade_parent_id =
        #{tbTradeParentId,jdbcType=VARCHAR},tk_adzone_id =
        #{tkAdzoneId,jdbcType=VARCHAR},tk_site_id =
        #{tkSiteId,jdbcType=VARCHAR},tk_pub_id =
        #{tkPubId,jdbcType=VARCHAR},special_id =
        #{specialId,jdbcType=VARCHAR},union_id =
        #{unionId,jdbcType=VARCHAR},create_time =
        #{createTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoPunishOrder">
        update yeshi_ec_taobao_punish_order
        <set>
            <if test="relationId != null">relation_id=#{relationId,jdbcType=VARCHAR},</if>
            <if test="settleMonth != null">settle_month=#{settleMonth,jdbcType=VARCHAR},</if>
            <if test="punishStatus != null">punish_status=#{punishStatus,jdbcType=VARCHAR},</if>
            <if test="violationType != null">violation_type=#{violationType,jdbcType=VARCHAR},</if>
            <if test="tkTradeCreateTime != null">tk_trade_create_time=#{tkTradeCreateTime,jdbcType=VARCHAR},
            </if>
            <if test="tbTradeId != null">tb_trade_id=#{tbTradeId,jdbcType=VARCHAR},</if>
            <if test="tbTradeParentId != null">tb_trade_parent_id=#{tbTradeParentId,jdbcType=VARCHAR},
            </if>
            <if test="tkAdzoneId != null">tk_adzone_id=#{tkAdzoneId,jdbcType=VARCHAR},</if>
            <if test="tkSiteId != null">tk_site_id=#{tkSiteId,jdbcType=VARCHAR},</if>
            <if test="tkPubId != null">tk_pub_id=#{tkPubId,jdbcType=VARCHAR},</if>
            <if test="specialId != null">special_id=#{specialId,jdbcType=VARCHAR},</if>
            <if test="unionId != null">union_id=#{unionId,jdbcType=VARCHAR},</if>
            <if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
</mapper>