|
|
@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="cash" column="cash" />
|
|
|
<result property="sort" column="sort" />
|
|
|
<result property="stock" column="stock" />
|
|
|
+ <result property="stockWarn" column="stock_warn" />
|
|
|
<result property="descs" column="descs" />
|
|
|
<result property="barCode" column="bar_code" />
|
|
|
<result property="tempId" column="temp_id" />
|
|
|
@@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="cash != null">cash,</if>
|
|
|
<if test="sort != null">sort,</if>
|
|
|
<if test="stock != null">stock,</if>
|
|
|
+ <if test="stockWarn != null">stock_warn,</if>
|
|
|
<if test="descs != null">descs,</if>
|
|
|
<if test="barCode != null">bar_code,</if>
|
|
|
<if test="tempId != null">temp_id,</if>
|
|
|
@@ -75,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="cash != null">#{cash},</if>
|
|
|
<if test="sort != null">#{sort},</if>
|
|
|
<if test="stock != null">#{stock},</if>
|
|
|
+ <if test="stockWarn != null">#{stockWarn},</if>
|
|
|
<if test="descs != null">#{descs},</if>
|
|
|
<if test="barCode != null">#{barCode},</if>
|
|
|
<if test="tempId != null">#{tempId},</if>
|
|
|
@@ -96,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="cash != null">cash = #{cash},</if>
|
|
|
<if test="sort != null">sort = #{sort},</if>
|
|
|
<if test="stock != null">stock = #{stock},</if>
|
|
|
+ <if test="stockWarn != null">stock_warn = #{stockWarn},</if>
|
|
|
<if test="descs != null">descs = #{descs},</if>
|
|
|
<if test="barCode != null">bar_code = #{barCode},</if>
|
|
|
<if test="tempId != null">temp_id = #{tempId},</if>
|
|
|
@@ -115,4 +119,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{goodsId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
+
|
|
|
+ <!-- 库存预警列表:上架中且库存<=预警阈值 -->
|
|
|
+ <select id="selectWarnList" resultMap="FsGuCoinGoodsResult">
|
|
|
+ select * from fs_gu_coin_goods
|
|
|
+ where status = 1
|
|
|
+ and stock <= stock_warn
|
|
|
+ order by stock asc, goods_id desc
|
|
|
+ </select>
|
|
|
</mapper>
|