领取优惠券操作
This commit is contained in:
@@ -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}
|
||||
|
||||
154
src/main/resources/mapper/TbSplitAccountsMapper.xml
Normal file
154
src/main/resources/mapper/TbSplitAccountsMapper.xml
Normal file
@@ -0,0 +1,154 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.TbSplitAccountsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
|
||||
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
|
||||
<result column="coupons_price" jdbcType="DECIMAL" property="couponsPrice" />
|
||||
<result column="conpons_amount" jdbcType="DECIMAL" property="conponsAmount" />
|
||||
<result column="is_split" jdbcType="VARCHAR" property="isSplit" />
|
||||
<result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
|
||||
<result column="origin_amount" jdbcType="DECIMAL" property="originAmount" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="split_time" jdbcType="TIMESTAMP" property="splitTime" />
|
||||
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, merchant_id, shop_id, coupons_price, conpons_amount, is_split, order_amount,
|
||||
create_time, split_time, trade_day,origin_amount
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_split_accounts
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_split_accounts
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
||||
insert into tb_split_accounts (id, merchant_id, shop_id,
|
||||
coupons_price, conpons_amount, is_split,
|
||||
order_amount, create_time, split_time,
|
||||
trade_day,origin_amount)
|
||||
values (#{id,jdbcType=INTEGER}, #{merchantId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER},
|
||||
#{couponsPrice,jdbcType=DECIMAL}, #{conponsAmount,jdbcType=DECIMAL}, #{isSplit,jdbcType=VARCHAR},
|
||||
#{orderAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{splitTime,jdbcType=TIMESTAMP},
|
||||
#{tradeDay,jdbcType=VARCHAR},#{originAmount,jdbcType=DECIMAL})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
||||
insert into tb_split_accounts
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="couponsPrice != null">
|
||||
coupons_price,
|
||||
</if>
|
||||
<if test="conponsAmount != null">
|
||||
conpons_amount,
|
||||
</if>
|
||||
<if test="isSplit != null">
|
||||
is_split,
|
||||
</if>
|
||||
<if test="orderAmount != null">
|
||||
order_amount,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="splitTime != null">
|
||||
split_time,
|
||||
</if>
|
||||
<if test="tradeDay != null">
|
||||
trade_day,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
#{merchantId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="couponsPrice != null">
|
||||
#{couponsPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="conponsAmount != null">
|
||||
#{conponsAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="isSplit != null">
|
||||
#{isSplit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderAmount != null">
|
||||
#{orderAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="splitTime != null">
|
||||
#{splitTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="tradeDay != null">
|
||||
#{tradeDay,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
||||
update tb_split_accounts
|
||||
<set>
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="couponsPrice != null">
|
||||
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="conponsAmount != null">
|
||||
conpons_amount = #{conponsAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="isSplit != null">
|
||||
is_split = #{isSplit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderAmount != null">
|
||||
order_amount = #{orderAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="splitTime != null">
|
||||
split_time = #{splitTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="tradeDay != null">
|
||||
trade_day = #{tradeDay,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
||||
update tb_split_accounts
|
||||
set merchant_id = #{merchantId,jdbcType=INTEGER},
|
||||
shop_id = #{shopId,jdbcType=INTEGER},
|
||||
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
|
||||
conpons_amount = #{conponsAmount,jdbcType=DECIMAL},
|
||||
is_split = #{isSplit,jdbcType=VARCHAR},
|
||||
order_amount = #{orderAmount,jdbcType=DECIMAL},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
split_time = #{splitTime,jdbcType=TIMESTAMP},
|
||||
trade_day = #{tradeDay,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user