admin
2020-06-15 3e4ef41ffacd7f5fda2e81c3810cd11a6375b83c
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?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.vipshop.VipShopOrderDetailMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail">
        <id column="vod_id" property="id" jdbcType="BIGINT" />
        <result column="vod_identify_code" property="identifyCode"
            jdbcType="VARCHAR" />
        <result column="vod_goods_id" property="goodsId" jdbcType="VARCHAR" />
        <result column="vod_goods_name" property="goodsName" jdbcType="VARCHAR" />
        <result column="vod_goods_thumb" property="goodsThumb"
            jdbcType="VARCHAR" />
        <result column="vod_goods_count" property="goodsCount"
            jdbcType="INTEGER" />
        <result column="vod_commission_total_cost" property="commissionTotalCost"
            jdbcType="DECIMAL" />
        <result column="vod_commission_rate" property="commissionRate"
            jdbcType="DECIMAL" />
        <result column="vod_commission" property="commission" jdbcType="DECIMAL" />
        <result column="vod_comm_code" property="commCode" jdbcType="VARCHAR" />
        <result column="vod_comm_name" property="commName" jdbcType="VARCHAR" />
        <result column="vod_order_source" property="orderSource"
            jdbcType="VARCHAR" />
        <result column="vod_size_id" property="sizeId" jdbcType="VARCHAR" />
        <result column="vod_status" property="status" jdbcType="INTEGER" />
        <result column="vod_order_sn" property="orderSn" jdbcType="VARCHAR" />
        <result column="vod_create_time" property="createTime"
            jdbcType="TIMESTAMP" />
        <result column="vod_update_time" property="updateTime"
            jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">vod_id,vod_identify_code,vod_goods_id,vod_goods_name,vod_goods_thumb,vod_goods_count,vod_commission_total_cost,vod_commission_rate,vod_commission,vod_comm_code,vod_comm_name,vod_order_source,vod_size_id,vod_status,vod_order_sn,vod_create_time,vod_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_vipshop_order_detail where vod_id =
        #{id,jdbcType=BIGINT}
    </select>
 
 
    <select id="selectByIdentifyCode" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_vipshop_order_detail where vod_identify_code =
        #{0}
    </select>
 
    <select id="listByOrderSn" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_vipshop_order_detail where vod_order_sn =
        #{0}
    </select>
 
 
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_vipshop_order_detail where vod_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_vipshop_order_detail
        (vod_id,vod_identify_code,vod_goods_id,vod_goods_name,vod_goods_thumb,vod_goods_count,vod_commission_total_cost,vod_commission_rate,vod_commission,vod_comm_code,vod_comm_name,vod_order_source,vod_size_id,vod_status,vod_order_sn,vod_create_time,vod_update_time)
        values
        (#{id,jdbcType=BIGINT},#{identifyCode,jdbcType=VARCHAR},#{goodsId,jdbcType=VARCHAR},#{goodsName,jdbcType=VARCHAR},#{goodsThumb,jdbcType=VARCHAR},#{goodsCount,jdbcType=INTEGER},#{commissionTotalCost,jdbcType=DECIMAL},#{commissionRate,jdbcType=DECIMAL},#{commission,jdbcType=DECIMAL},#{commCode,jdbcType=VARCHAR},#{commName,jdbcType=VARCHAR},#{orderSource,jdbcType=VARCHAR},#{sizeId,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{orderSn,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_vipshop_order_detail
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">vod_id,</if>
            <if test="identifyCode != null">vod_identify_code,</if>
            <if test="goodsId != null">vod_goods_id,</if>
            <if test="goodsName != null">vod_goods_name,</if>
            <if test="goodsThumb != null">vod_goods_thumb,</if>
            <if test="goodsCount != null">vod_goods_count,</if>
            <if test="commissionTotalCost != null">vod_commission_total_cost,</if>
            <if test="commissionRate != null">vod_commission_rate,</if>
            <if test="commission != null">vod_commission,</if>
            <if test="commCode != null">vod_comm_code,</if>
            <if test="commName != null">vod_comm_name,</if>
            <if test="orderSource != null">vod_order_source,</if>
            <if test="sizeId != null">vod_size_id,</if>
            <if test="status != null">vod_status,</if>
            <if test="orderSn != null">vod_order_sn,</if>
            <if test="createTime != null">vod_create_time,</if>
            <if test="updateTime != null">vod_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="identifyCode != null">#{identifyCode,jdbcType=VARCHAR},</if>
            <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if>
            <if test="goodsName != null">#{goodsName,jdbcType=VARCHAR},</if>
            <if test="goodsThumb != null">#{goodsThumb,jdbcType=VARCHAR},</if>
            <if test="goodsCount != null">#{goodsCount,jdbcType=INTEGER},</if>
            <if test="commissionTotalCost != null">#{commissionTotalCost,jdbcType=DECIMAL},</if>
            <if test="commissionRate != null">#{commissionRate,jdbcType=DECIMAL},</if>
            <if test="commission != null">#{commission,jdbcType=DECIMAL},</if>
            <if test="commCode != null">#{commCode,jdbcType=VARCHAR},</if>
            <if test="commName != null">#{commName,jdbcType=VARCHAR},</if>
            <if test="orderSource != null">#{orderSource,jdbcType=VARCHAR},</if>
            <if test="sizeId != null">#{sizeId,jdbcType=VARCHAR},</if>
            <if test="status != null">#{status,jdbcType=INTEGER},</if>
            <if test="orderSn != null">#{orderSn,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.vipshop.VipShopOrderDetail">update
        yeshi_ec_vipshop_order_detail set vod_identify_code =
        #{identifyCode,jdbcType=VARCHAR},vod_goods_id =
        #{goodsId,jdbcType=VARCHAR},vod_goods_name =
        #{goodsName,jdbcType=VARCHAR},vod_goods_thumb =
        #{goodsThumb,jdbcType=VARCHAR},vod_goods_count =
        #{goodsCount,jdbcType=INTEGER},vod_commission_total_cost =
        #{commissionTotalCost,jdbcType=DECIMAL},vod_commission_rate =
        #{commissionRate,jdbcType=DECIMAL},vod_commission =
        #{commission,jdbcType=DECIMAL},vod_comm_code =
        #{commCode,jdbcType=VARCHAR},vod_comm_name =
        #{commName,jdbcType=VARCHAR},vod_order_source =
        #{orderSource,jdbcType=VARCHAR},vod_size_id =
        #{sizeId,jdbcType=VARCHAR},vod_status =
        #{status,jdbcType=INTEGER},vod_order_sn =
        #{orderSn,jdbcType=VARCHAR},vod_create_time =
        #{createTime,jdbcType=TIMESTAMP},vod_update_time =
        #{updateTime,jdbcType=TIMESTAMP} where vod_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail">
        update yeshi_ec_vipshop_order_detail
        <set>
            <if test="identifyCode != null">vod_identify_code=#{identifyCode,jdbcType=VARCHAR},</if>
            <if test="goodsId != null">vod_goods_id=#{goodsId,jdbcType=VARCHAR},</if>
            <if test="goodsName != null">vod_goods_name=#{goodsName,jdbcType=VARCHAR},</if>
            <if test="goodsThumb != null">vod_goods_thumb=#{goodsThumb,jdbcType=VARCHAR},</if>
            <if test="goodsCount != null">vod_goods_count=#{goodsCount,jdbcType=INTEGER},</if>
            <if test="commissionTotalCost != null">vod_commission_total_cost=#{commissionTotalCost,jdbcType=DECIMAL},
            </if>
            <if test="commissionRate != null">vod_commission_rate=#{commissionRate,jdbcType=DECIMAL},
            </if>
            <if test="commission != null">vod_commission=#{commission,jdbcType=DECIMAL},</if>
            <if test="commCode != null">vod_comm_code=#{commCode,jdbcType=VARCHAR},</if>
            <if test="commName != null">vod_comm_name=#{commName,jdbcType=VARCHAR},</if>
            <if test="orderSource != null">vod_order_source=#{orderSource,jdbcType=VARCHAR},</if>
            <if test="sizeId != null">vod_size_id=#{sizeId,jdbcType=VARCHAR},</if>
            <if test="status != null">vod_status=#{status,jdbcType=INTEGER},</if>
            <if test="orderSn != null">vod_order_sn=#{orderSn,jdbcType=VARCHAR},</if>
            <if test="createTime != null">vod_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">vod_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where vod_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>