新增下单库存预警消息推送

This commit is contained in:
2024-06-28 14:10:32 +08:00
parent 6fc74c9700
commit ea4366362e
5 changed files with 362 additions and 1 deletions

View File

@@ -0,0 +1,91 @@
<?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.TbUserShopMsgMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
<id property="shopId" column="shop_id" jdbcType="INTEGER"/>
<result property="openId" column="open_id" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
shop_id,open_id,remark,
status,create_time,update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_user_shop_msg
where shop_id = #{shopId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tb_user_shop_msg
where shop_id = #{shopId,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="shop_id" keyProperty="shopId" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg" useGeneratedKeys="true">
insert into tb_user_shop_msg
( shop_id,open_id,remark
,status,create_time,update_time
)
values (#{shopId,jdbcType=INTEGER},#{openId,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR}
,#{status,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" keyColumn="shop_id" keyProperty="shopId" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg" useGeneratedKeys="true">
insert into tb_user_shop_msg
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="shopId != null">shop_id,</if>
<if test="openId != null">open_id,</if>
<if test="remark != null">remark,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="shopId != null">#{shopId,jdbcType=INTEGER},</if>
<if test="openId != null">#{openId,jdbcType=VARCHAR},</if>
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
<if test="status != null">#{status,jdbcType=VARCHAR},</if>
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
update tb_user_shop_msg
<set>
<if test="openId != null">
open_id = #{openId,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where shop_id = #{shopId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserShopMsg">
update tb_user_shop_msg
set
open_id = #{openId,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where shop_id = #{shopId,jdbcType=INTEGER}
</update>
</mapper>