1.库存预警提示语修改

2.库存预警30分钟内只推送一次
3.点歌支付成功同步保存平台订单号
This commit is contained in:
2024-07-11 09:36:26 +08:00
parent 4b2996adb3
commit 9c9c7d8608
10 changed files with 100 additions and 105 deletions

View File

@@ -8,7 +8,7 @@
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="songId" column="song_id" jdbcType="INTEGER"/>
<result property="songName" column="song_name" jdbcType="VARCHAR"/>
<result property="openId" column="open_id" jdbcType="INTEGER"/>
<result property="openId" column="open_id" jdbcType="VARCHAR"/>
<result property="payMoney" column="pay_money" jdbcType="DECIMAL"/>
<result property="state" column="state" jdbcType="TINYINT"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
@@ -19,6 +19,7 @@
<result property="note" column="note" jdbcType="VARCHAR"/>
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="realMoney" column="real_money" jdbcType="DECIMAL"/>
<result property="payOrderId" column="pay_order_id" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
@@ -26,19 +27,19 @@
open_id,pay_money,state,
create_time,client_type,order_no,
from_name,to_name,note,
shop_id,real_money
shop_id,real_money,pay_order_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_song_order
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tb_shop_song_order
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopSongOrder" useGeneratedKeys="true">
insert into tb_shop_song_order
@@ -46,12 +47,14 @@
,open_id,pay_money,state
,create_time,client_type,order_no
,from_name,to_name,note
,shop_id,real_money)
,shop_id,real_money,pay_order_id
)
values (#{id,jdbcType=INTEGER},#{songId,jdbcType=INTEGER},#{songName,jdbcType=VARCHAR}
,#{openId,jdbcType=INTEGER},#{payMoney,jdbcType=DECIMAL},#{state,jdbcType=TINYINT}
,#{openId,jdbcType=VARCHAR},#{payMoney,jdbcType=DECIMAL},#{state,jdbcType=TINYINT}
,#{createTime,jdbcType=TIMESTAMP},#{clientType,jdbcType=TINYINT},#{orderNo,jdbcType=VARCHAR}
,#{fromName,jdbcType=VARCHAR},#{toName,jdbcType=VARCHAR},#{note,jdbcType=VARCHAR}
,#{shopId,jdbcType=INTEGER},#{realMoney,jdbcType=DECIMAL})
,#{shopId,jdbcType=INTEGER},#{realMoney,jdbcType=DECIMAL},#{payOrderId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopSongOrder" useGeneratedKeys="true">
insert into tb_shop_song_order
@@ -70,12 +73,13 @@
<if test="note != null">note,</if>
<if test="shopId != null">shop_id,</if>
<if test="realMoney != null">real_money,</if>
<if test="payOrderId != null">pay_order_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id,jdbcType=INTEGER},</if>
<if test="songId != null">#{songId,jdbcType=INTEGER},</if>
<if test="songName != null">#{songName,jdbcType=VARCHAR},</if>
<if test="openId != null">#{openId,jdbcType=INTEGER},</if>
<if test="openId != null">#{openId,jdbcType=VARCHAR},</if>
<if test="payMoney != null">#{payMoney,jdbcType=DECIMAL},</if>
<if test="state != null">#{state,jdbcType=TINYINT},</if>
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
@@ -86,6 +90,7 @@
<if test="note != null">#{note,jdbcType=VARCHAR},</if>
<if test="shopId != null">#{shopId,jdbcType=INTEGER},</if>
<if test="realMoney != null">#{realMoney,jdbcType=DECIMAL},</if>
<if test="payOrderId != null">#{payOrderId,jdbcType=VARCHAR},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopSongOrder">
@@ -98,7 +103,7 @@
song_name = #{songName,jdbcType=VARCHAR},
</if>
<if test="openId != null">
open_id = #{openId,jdbcType=INTEGER},
open_id = #{openId,jdbcType=VARCHAR},
</if>
<if test="payMoney != null">
pay_money = #{payMoney,jdbcType=DECIMAL},
@@ -130,15 +135,18 @@
<if test="realMoney != null">
real_money = #{realMoney,jdbcType=DECIMAL},
</if>
<if test="payOrderId != null">
pay_order_id = #{payOrderId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopSongOrder">
update tb_shop_song_order
set
set
song_id = #{songId,jdbcType=INTEGER},
song_name = #{songName,jdbcType=VARCHAR},
open_id = #{openId,jdbcType=INTEGER},
open_id = #{openId,jdbcType=VARCHAR},
pay_money = #{payMoney,jdbcType=DECIMAL},
state = #{state,jdbcType=TINYINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -148,18 +156,8 @@
to_name = #{toName,jdbcType=VARCHAR},
note = #{note,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=INTEGER},
real_money = #{realMoney,jdbcType=DECIMAL}
where id = #{id,jdbcType=INTEGER}
real_money = #{realMoney,jdbcType=DECIMAL},
pay_order_id = #{payOrderId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByUserIdAndId" resultType="java.util.Map">
SELECT
*
FROM
tb_shop_song_order AS a
LEFT JOIN tb_shop_song AS b ON a.song_id = b.id
WHERE
a.open_id = #{openId}
AND a.id=#{id}
</select>
</mapper>