领取优惠券操作

This commit is contained in:
19991905653
2024-04-12 13:35:02 +08:00
parent 3a90299b64
commit e86ec29a33
18 changed files with 259 additions and 185 deletions

View File

@@ -8,10 +8,11 @@
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="from_source" jdbcType="VARCHAR" property="fromSource" />
<result column="operation_type" jdbcType="VARCHAR" property="operationType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, num, type, remark, from_source, create_time
id, user_id, num, type, remark, from_source, create_time,operation_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -23,17 +24,20 @@
parameterType="java.lang.String">
select * from tb_release_flow where user_id = #{userId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
select trf.*,tui.nick_name as nickName,tui.mini_app_open_id as openId from tb_release_flow trf left join tb_user_info tui on trf.user_id = tui.id
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_release_flow
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
insert into tb_release_flow (id, user_id, num,
type, remark, from_source,
create_time)
create_time,operation_type)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{num,jdbcType=DECIMAL},
#{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{fromSource,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}, #{operationType,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReleaseFlow">
insert into tb_release_flow

View File

@@ -7,12 +7,13 @@
<result column="coupons_price" jdbcType="DECIMAL" property="couponsPrice" />
<result column="coupons_amount" jdbcType="DECIMAL" property="couponsAmount" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="is_double" jdbcType="VARCHAR" property="isDouble" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, coupons_price, coupons_amount, status, create_time, update_time, end_time
id, user_id, coupons_price, coupons_amount, status, create_time, update_time, end_time,is_double
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -26,6 +27,9 @@
and status = #{status}
</if>
</select>
<select id="selectByOrderId" resultType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
select * from tb_user_coupons where order_id = #{orderId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_user_coupons
where id = #{id,jdbcType=INTEGER}
@@ -33,10 +37,10 @@
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons" useGeneratedKeys="true" keyProperty="id">
insert into tb_user_coupons (id, user_id, coupons_price,
coupons_amount, status, create_time,
update_time, end_time)
update_time, end_time,is_double)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{couponsPrice,jdbcType=DECIMAL},
#{couponsAmount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})
#{updateTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{isDouble,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserCoupons">
insert into tb_user_coupons

View File

@@ -600,5 +600,8 @@
<select id="selectByPhone" resultMap="BaseResultMap">
select * from tb_user_info where telephone=#{phone} AND source_path='APP' AND user_id is null
</select>
<select id="selectAll" resultType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
select * from tb_user_info
</select>
</mapper>