优惠券+异常全局处理

This commit is contained in:
19991905653
2024-04-10 18:16:28 +08:00
parent 342d0d82e1
commit 3a90299b64
43 changed files with 1374 additions and 579 deletions

View File

@@ -7,11 +7,17 @@
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
<result column="is_user" jdbcType="VARCHAR" property="isUser" />
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="is_refund" jdbcType="VARCHAR" property="isRefund" />
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
<result column="refund_no" jdbcType="VARCHAR" property="refundNo" />
<result column="refund_pay_type" jdbcType="VARCHAR" property="refundPayType" />
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
<result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_name, order_no, order_amount, is_user, create_time,trade_day
id, user_name, order_no, order_amount, is_user, create_time, is_refund, refund_amount,
refund_no, refund_pay_type, trade_day, refund_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -19,19 +25,20 @@
from tb_wining_user
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAllByTrade" resultType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
select * from tb_wining_user where trade_day = #{day}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_wining_user
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
insert into tb_wining_user (id, user_name, order_no,
order_amount, is_user, create_time
order_amount, is_user, create_time,
is_refund, refund_amount, refund_no,
refund_pay_type, trade_day, refund_time
)
values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR},
#{orderAmount,jdbcType=DECIMAL}, #{isUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
#{orderAmount,jdbcType=DECIMAL}, #{isUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{isRefund,jdbcType=VARCHAR}, #{refundAmount,jdbcType=DECIMAL}, #{refundNo,jdbcType=VARCHAR},
#{refundPayType,jdbcType=VARCHAR}, #{tradeDay,jdbcType=VARCHAR}, #{refundTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
@@ -55,6 +62,24 @@
<if test="createTime != null">
create_time,
</if>
<if test="isRefund != null">
is_refund,
</if>
<if test="refundAmount != null">
refund_amount,
</if>
<if test="refundNo != null">
refund_no,
</if>
<if test="refundPayType != null">
refund_pay_type,
</if>
<if test="tradeDay != null">
trade_day,
</if>
<if test="refundTime != null">
refund_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -75,6 +100,24 @@
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="isRefund != null">
#{isRefund,jdbcType=VARCHAR},
</if>
<if test="refundAmount != null">
#{refundAmount,jdbcType=DECIMAL},
</if>
<if test="refundNo != null">
#{refundNo,jdbcType=VARCHAR},
</if>
<if test="refundPayType != null">
#{refundPayType,jdbcType=VARCHAR},
</if>
<if test="tradeDay != null">
#{tradeDay,jdbcType=VARCHAR},
</if>
<if test="refundTime != null">
#{refundTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
@@ -95,6 +138,24 @@
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="isRefund != null">
is_refund = #{isRefund,jdbcType=VARCHAR},
</if>
<if test="refundAmount != null">
refund_amount = #{refundAmount,jdbcType=DECIMAL},
</if>
<if test="refundNo != null">
refund_no = #{refundNo,jdbcType=VARCHAR},
</if>
<if test="refundPayType != null">
refund_pay_type = #{refundPayType,jdbcType=VARCHAR},
</if>
<if test="tradeDay != null">
trade_day = #{tradeDay,jdbcType=VARCHAR},
</if>
<if test="refundTime != null">
refund_time = #{refundTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@@ -104,7 +165,16 @@
order_no = #{orderNo,jdbcType=VARCHAR},
order_amount = #{orderAmount,jdbcType=DECIMAL},
is_user = #{isUser,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
create_time = #{createTime,jdbcType=TIMESTAMP},
is_refund = #{isRefund,jdbcType=VARCHAR},
refund_amount = #{refundAmount,jdbcType=DECIMAL},
refund_no = #{refundNo,jdbcType=VARCHAR},
refund_pay_type = #{refundPayType,jdbcType=VARCHAR},
trade_day = #{tradeDay,jdbcType=VARCHAR},
refund_time = #{refundTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectAllByTrade" resultType="com.chaozhanggui.system.cashierservice.entity.TbWiningUser">
select * from tb_wining_user where trade_day = #{day}
</select>
</mapper>