领取优惠券操作

This commit is contained in:
19991905653
2024-04-15 14:36:46 +08:00
parent f203d7bccc
commit 2cd2ef8c07
6 changed files with 225 additions and 11 deletions

View File

@@ -47,6 +47,7 @@
<result column="master_id" jdbcType="VARCHAR" property="masterId"/>
<result column="table_name" jdbcType="VARCHAR" property="tableName"/>
<result column="is_buy_coupon" jdbcType="VARCHAR" property="isBuyCoupon"/>
<result column="is_use_coupon" jdbcType="VARCHAR" property="isUseCoupon"/>
</resultMap>
<sql id="Base_Column_List">
id, order_no, settlement_amount, pack_fee, origin_amount, product_amount, amount,
@@ -54,7 +55,8 @@
discount_amount, table_id, small_change, send_type, order_type, product_type, status,
billing_id, merchant_id, shop_id, is_vip, member_id, user_id, product_score, deduct_score,
user_coupon_id, user_coupon_amount, refund_able, paid_time, is_effect, is_group,
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,remark,master_id,`table_name`,is_buy_coupon
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,
remark,master_id,`table_name`,is_buy_coupon,is_use_coupon
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -81,7 +83,7 @@
deduct_score, user_coupon_id, user_coupon_amount,
refund_able, paid_time, is_effect,
is_group, updated_at, system_time,
created_at, is_accepted, pay_order_no,trade_day,source,remark,master_id,table_name,is_buy_coupon
created_at, is_accepted, pay_order_no,trade_day,source,remark,master_id,table_name,is_buy_coupon,is_use_coupon
)
values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
#{packFee,jdbcType=DECIMAL}, #{originAmount,jdbcType=DECIMAL}, #{productAmount,jdbcType=DECIMAL},
@@ -97,7 +99,7 @@
#{isGroup,jdbcType=TINYINT}, #{updatedAt,jdbcType=BIGINT}, #{systemTime,jdbcType=BIGINT},
#{createdAt,jdbcType=BIGINT}, #{isAccepted,jdbcType=TINYINT}, #{payOrderNo,jdbcType=VARCHAR},
#{tradeDay,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
#{masterId,jdbcType=VARCHAR}, #{tableName,jdbcType=VARCHAR}, #{isBuyCoupon,jdbcType=VARCHAR}
#{masterId,jdbcType=VARCHAR}, #{tableName,jdbcType=VARCHAR}, #{isBuyCoupon,jdbcType=VARCHAR}, #{isUseCoupon,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo"
@@ -221,15 +223,15 @@
<if test="payOrderNo != null">
pay_order_no,
</if>
<if test="isBuyCoupon != null">
is_buy_coupon,
<if test="isBuyCoupon != null">
is_buy_coupon,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="isBuyCoupon != null">
<if test="isBuyCoupon != null">
#{isBuyCoupon,jdbcType=INTEGER},
</if>
<if test="orderNo != null">
@@ -471,8 +473,11 @@
<if test="tradeDay != null">
trade_day = #{tradeDay,jdbcType=VARCHAR},
</if>
<if test="isBuyCoupon != null">
is_buy_coupon = #{isBuyCoupon,jdbcType=VARCHAR},
<if test="isBuyCoupon != null">
is_buy_coupon = #{isBuyCoupon,jdbcType=VARCHAR},
</if>
<if test="isUseCoupon != null">
is_use_coupon = #{isUseCoupon,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
@@ -529,7 +534,7 @@
</select>
<select id="selectByUserId" resultType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
select
*
*
from tb_order_info a
where user_id = #{userId}