admin
2019-11-03 788deca1b4a24f8a24e49c24f7d89975a1d74bbe
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?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.shop.BanLiShopOrderMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.shop.BanLiShopOrder">
        <id column="so_id" property="id" jdbcType="BIGINT" />
        <result column="so_uid" property="uid" jdbcType="BIGINT" />
        <result column="so_order_no" property="orderNo" jdbcType="VARCHAR" />
        <result column="so_payment_hongbao" property="hongBaoPayment"
            jdbcType="DECIMAL" />
        <result column="so_payment_hongbao_state" property="hongBaoPaymentState"
            jdbcType="INTEGER" />
        <result column="so_payment_money" property="balancePayment"
            jdbcType="DECIMAL" />
        <result column="so_payment_money_state" property="balancePaymentState"
            jdbcType="INTEGER" />
        <result column="so_payment_balance" property="moneyPayment"
            jdbcType="DECIMAL" />
        <result column="so_payment_balance_state" property="moneyPaymentState"
            jdbcType="INTEGER" />
        <result column="so_pay_time" property="payTime" jdbcType="TIMESTAMP" />
        <result column="so_reject_time" property="rejectTime" jdbcType="TIMESTAMP" />
        <result column="so_success_time" property="successTime"
            jdbcType="TIMESTAMP" />
        <result column="so_state" property="state" jdbcType="INTEGER" />
        <result column="so_state_desc" property="stateDesc" jdbcType="VARCHAR" />
        <result column="so_charge_account" property="chargeAccount"
            jdbcType="VARCHAR" />
        <result column="so_charge_account2" property="chargeAccount2"
            jdbcType="VARCHAR" />
        <result column="so_beizhu" property="beiZhu" jdbcType="VARCHAR" />
        <result column="so_create_time" property="createTime" jdbcType="TIMESTAMP" />
        <result column="so_update_time" property="updateTime" jdbcType="TIMESTAMP" />
        <association property="goods" column="so_goods_id"
            javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods">
            <id column="so_goods_id" property="id" jdbcType="BIGINT" />
        </association>
        <association property="goodsSet" column="so_goods_set_id"
            javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
            <id column="so_goods_set_id" property="id" jdbcType="BIGINT" />
        </association>
    </resultMap>
    <sql id="Base_Column_List">so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}
    </select>
    
    <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_shop_order where so_id = #{0} for update
    </select>
    
    
    
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"
        useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_shop_order
        (so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time)
        values
        (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{orderNo,jdbcType=VARCHAR},#{goods.id,jdbcType=BIGINT},#{goodsSet.id,jdbcType=BIGINT},#{hongBaoPayment,jdbcType=DECIMAL},#{hongBaoPaymentState,jdbcType=INTEGER},#{balancePayment,jdbcType=DECIMAL},#{balancePaymentState,jdbcType=INTEGER},#{moneyPayment,jdbcType=DECIMAL},#{moneyPaymentState,jdbcType=INTEGER},#{payTime,jdbcType=TIMESTAMP},#{rejectTime,jdbcType=TIMESTAMP},#{successTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{stateDesc,jdbcType=VARCHAR},#{chargeAccount,jdbcType=VARCHAR},#{chargeAccount2,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_shop_order
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">so_id,</if>
            <if test="uid != null">so_uid,</if>
            <if test="orderNo != null">so_order_no,</if>
            <if test="goods != null">so_goods_id,</if>
            <if test="goodsSet != null">so_goods_set_id,</if>
            <if test="hongBaoPayment != null">so_payment_hongbao,</if>
            <if test="hongBaoPaymentState != null">so_payment_hongbao_state,</if>
            <if test="balancePayment != null">so_payment_money,</if>
            <if test="balancePaymentState != null">so_payment_money_state,</if>
            <if test="moneyPayment != null">so_payment_balance,</if>
            <if test="moneyPaymentState != null">so_payment_balance_state,</if>
            <if test="payTime != null">so_pay_time,</if>
            <if test="rejectTime != null">so_reject_time,</if>
            <if test="successTime != null">so_success_time,</if>
            <if test="state != null">so_state,</if>
            <if test="stateDesc != null">so_state_desc,</if>
            <if test="chargeAccount != null">so_charge_account,</if>
            <if test="chargeAccount2 != null">so_charge_account2,</if>
            <if test="beiZhu != null">so_beizhu,</if>
            <if test="createTime != null">so_create_time,</if>
            <if test="updateTime != null">so_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
            <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
            <if test="goods != null">#{goods.id,jdbcType=BIGINT},</if>
            <if test="goodsSet != null">#{goodsSet.id,jdbcType=BIGINT},</if>
            <if test="hongBaoPayment != null">#{hongBaoPayment,jdbcType=DECIMAL},</if>
            <if test="hongBaoPaymentState != null">#{hongBaoPaymentState,jdbcType=INTEGER},</if>
            <if test="balancePayment != null">#{balancePayment,jdbcType=DECIMAL},</if>
            <if test="balancePaymentState != null">#{balancePaymentState,jdbcType=INTEGER},</if>
            <if test="moneyPayment != null">#{moneyPayment,jdbcType=DECIMAL},</if>
            <if test="moneyPaymentState != null">#{moneyPaymentState,jdbcType=INTEGER},</if>
            <if test="payTime != null">#{payTime,jdbcType=TIMESTAMP},</if>
            <if test="rejectTime != null">#{rejectTime,jdbcType=TIMESTAMP},</if>
            <if test="successTime != null">#{successTime,jdbcType=TIMESTAMP},</if>
            <if test="state != null">#{state,jdbcType=INTEGER},</if>
            <if test="stateDesc != null">#{stateDesc,jdbcType=VARCHAR},</if>
            <if test="chargeAccount != null">#{chargeAccount,jdbcType=VARCHAR},</if>
            <if test="chargeAccount2 != null">#{chargeAccount2,jdbcType=VARCHAR},</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.shop.BanLiShopOrder">update
        yeshi_ec_shop_order set so_uid = #{uid,jdbcType=BIGINT},so_order_no =
        #{orderNo,jdbcType=VARCHAR},so_goods_id =
        #{goods.id,jdbcType=BIGINT},so_goods_set_id =
        #{goodsSet.id,jdbcType=BIGINT},so_payment_hongbao =
        #{hongBaoPayment,jdbcType=DECIMAL},so_payment_hongbao_state =
        #{hongBaoPaymentState,jdbcType=INTEGER},so_payment_money =
        #{balancePayment,jdbcType=DECIMAL},so_payment_money_state =
        #{balancePaymentState,jdbcType=INTEGER},so_payment_balance =
        #{moneyPayment,jdbcType=DECIMAL},so_payment_balance_state =
        #{moneyPaymentState,jdbcType=INTEGER},so_pay_time =
        #{payTime,jdbcType=TIMESTAMP},so_reject_time =
        #{rejectTime,jdbcType=TIMESTAMP},so_success_time =
        #{successTime,jdbcType=TIMESTAMP},so_state =
        #{state,jdbcType=INTEGER},so_state_desc =
        #{stateDesc,jdbcType=VARCHAR},so_charge_account =
        #{chargeAccount,jdbcType=VARCHAR},so_charge_account2 =
        #{chargeAccount2,jdbcType=VARCHAR},so_beizhu =
        #{beiZhu,jdbcType=VARCHAR},so_create_time =
        #{createTime,jdbcType=TIMESTAMP},so_update_time =
        #{updateTime,jdbcType=TIMESTAMP} where so_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder">
        update yeshi_ec_shop_order
        <set>
            <if test="uid != null">so_uid=#{uid,jdbcType=BIGINT},</if>
            <if test="orderNo != null">so_order_no=#{orderNo,jdbcType=VARCHAR},</if>
            <if test="goods != null">so_goods_id=#{goods.id,jdbcType=BIGINT},</if>
            <if test="goodsSet != null">so_goods_set_id=#{goodsSet.id,jdbcType=BIGINT},</if>
            <if test="hongBaoPayment != null">so_payment_hongbao=#{hongBaoPayment,jdbcType=DECIMAL},
            </if>
            <if test="hongBaoPaymentState != null">so_payment_hongbao_state=#{hongBaoPaymentState,jdbcType=INTEGER},
            </if>
            <if test="balancePayment != null">so_payment_money=#{balancePayment,jdbcType=DECIMAL},</if>
            <if test="balancePaymentState != null">so_payment_money_state=#{balancePaymentState,jdbcType=INTEGER},
            </if>
            <if test="moneyPayment != null">so_payment_balance=#{moneyPayment,jdbcType=DECIMAL},</if>
            <if test="moneyPaymentState != null">so_payment_balance_state=#{moneyPaymentState,jdbcType=INTEGER},
            </if>
            <if test="payTime != null">so_pay_time=#{payTime,jdbcType=TIMESTAMP},</if>
            <if test="rejectTime != null">so_reject_time=#{rejectTime,jdbcType=TIMESTAMP},</if>
            <if test="successTime != null">so_success_time=#{successTime,jdbcType=TIMESTAMP},</if>
            <if test="state != null">so_state=#{state,jdbcType=INTEGER},</if>
            <if test="stateDesc != null">so_state_desc=#{stateDesc,jdbcType=VARCHAR},</if>
            <if test="chargeAccount != null">so_charge_account=#{chargeAccount,jdbcType=VARCHAR},</if>
            <if test="chargeAccount2 != null">so_charge_account2=#{chargeAccount2,jdbcType=VARCHAR},
            </if>
            <if test="beiZhu != null">so_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="createTime != null">so_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">so_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where so_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>