yujian
2020-06-09 554de444b87aab5f93cb1593a8095612cf9479a7
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
<?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.VipShopAfterSaleDetailInfoMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo">
        <id column="sdi_id" property="id" jdbcType="BIGINT" />
        <result column="sdi_order_detail_id" property="orderDetailId"
            jdbcType="BIGINT" />
        <result column="sdi_after_sale_changed_commission" property="afterSaleChangedCommission"
            jdbcType="VARCHAR" />
        <result column="sdi_after_sale_changed_goods_count" property="afterSaleChangedGoodsCount"
            jdbcType="VARCHAR" />
        <result column="sdi_after_sale_sn" property="afterSaleSn"
            jdbcType="VARCHAR" />
        <result column="sdi_after_sale_status" property="afterSaleStatus"
            jdbcType="INTEGER" />
        <result column="sdi_after_sale_type" property="afterSaleType"
            jdbcType="INTEGER" />
        <result column="sdi_after_sale_finish_time" property="afterSaleFinishTime"
            jdbcType="VARCHAR" />
        <result column="sdi_create_time" property="createTime"
            jdbcType="TIMESTAMP" />
        <result column="sdi_update_time" property="updateTime"
            jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">sdi_id,sdi_order_detail_id,sdi_after_sale_changed_commission,sdi_after_sale_changed_goods_count,sdi_after_sale_sn,sdi_after_sale_status,sdi_after_sale_type,sdi_after_sale_finish_time,sdi_create_time,sdi_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_vipshop_after_sale_detail_info where sdi_id =
        #{id,jdbcType=BIGINT}
    </select>
 
    <select id="selectByOrderDetailId" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_vipshop_after_sale_detail_info where sdi_order_detail_id
        =
        #{0}
    </select>
 
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_vipshop_after_sale_detail_info where sdi_id =
        #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert"
        parameterType="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_vipshop_after_sale_detail_info
        (sdi_id,sdi_order_detail_id,sdi_after_sale_changed_commission,sdi_after_sale_changed_goods_count,sdi_after_sale_sn,sdi_after_sale_status,sdi_after_sale_type,sdi_after_sale_finish_time,sdi_create_time,sdi_update_time)
        values
        (#{id,jdbcType=BIGINT},#{orderDetailId,jdbcType=BIGINT},#{afterSaleChangedCommission,jdbcType=VARCHAR},#{afterSaleChangedGoodsCount,jdbcType=VARCHAR},#{afterSaleSn,jdbcType=VARCHAR},#{afterSaleStatus,jdbcType=INTEGER},#{afterSaleType,jdbcType=INTEGER},#{afterSaleFinishTime,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective"
        parameterType="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_vipshop_after_sale_detail_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">sdi_id,</if>
            <if test="orderDetailId != null">sdi_order_detail_id,</if>
            <if test="afterSaleChangedCommission != null">sdi_after_sale_changed_commission,</if>
            <if test="afterSaleChangedGoodsCount != null">sdi_after_sale_changed_goods_count,</if>
            <if test="afterSaleSn != null">sdi_after_sale_sn,</if>
            <if test="afterSaleStatus != null">sdi_after_sale_status,</if>
            <if test="afterSaleType != null">sdi_after_sale_type,</if>
            <if test="afterSaleFinishTime != null">sdi_after_sale_finish_time,</if>
            <if test="createTime != null">sdi_create_time,</if>
            <if test="updateTime != null">sdi_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="orderDetailId != null">#{orderDetailId,jdbcType=BIGINT},</if>
            <if test="afterSaleChangedCommission != null">#{afterSaleChangedCommission,jdbcType=VARCHAR},</if>
            <if test="afterSaleChangedGoodsCount != null">#{afterSaleChangedGoodsCount,jdbcType=VARCHAR},</if>
            <if test="afterSaleSn != null">#{afterSaleSn,jdbcType=VARCHAR},</if>
            <if test="afterSaleStatus != null">#{afterSaleStatus,jdbcType=INTEGER},</if>
            <if test="afterSaleType != null">#{afterSaleType,jdbcType=INTEGER},</if>
            <if test="afterSaleFinishTime != null">#{afterSaleFinishTime,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.VipShopAfterSaleDetailInfo">update yeshi_ec_vipshop_after_sale_detail_info set
        sdi_order_detail_id =
        #{orderDetailId,jdbcType=BIGINT},sdi_after_sale_changed_commission =
        #{afterSaleChangedCommission,jdbcType=VARCHAR},sdi_after_sale_changed_goods_count
        = #{afterSaleChangedGoodsCount,jdbcType=VARCHAR},sdi_after_sale_sn =
        #{afterSaleSn,jdbcType=VARCHAR},sdi_after_sale_status =
        #{afterSaleStatus,jdbcType=INTEGER},sdi_after_sale_type =
        #{afterSaleType,jdbcType=INTEGER},sdi_after_sale_finish_time =
        #{afterSaleFinishTime,jdbcType=VARCHAR},sdi_create_time =
        #{createTime,jdbcType=TIMESTAMP},sdi_update_time =
        #{updateTime,jdbcType=TIMESTAMP} where sdi_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective"
        parameterType="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo">
        update yeshi_ec_vipshop_after_sale_detail_info
        <set>
            <if test="orderDetailId != null">sdi_order_detail_id=#{orderDetailId,jdbcType=BIGINT},
            </if>
            <if test="afterSaleChangedCommission != null">sdi_after_sale_changed_commission=#{afterSaleChangedCommission,jdbcType=VARCHAR},
            </if>
            <if test="afterSaleChangedGoodsCount != null">sdi_after_sale_changed_goods_count=#{afterSaleChangedGoodsCount,jdbcType=VARCHAR},
            </if>
            <if test="afterSaleSn != null">sdi_after_sale_sn=#{afterSaleSn,jdbcType=VARCHAR},</if>
            <if test="afterSaleStatus != null">sdi_after_sale_status=#{afterSaleStatus,jdbcType=INTEGER},
            </if>
            <if test="afterSaleType != null">sdi_after_sale_type=#{afterSaleType,jdbcType=INTEGER},
            </if>
            <if test="afterSaleFinishTime != null">sdi_after_sale_finish_time=#{afterSaleFinishTime,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">sdi_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">sdi_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where sdi_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>