客户端增加扣减库存

This commit is contained in:
19991905653
2024-04-09 17:24:44 +08:00
parent bc4c3e6975
commit 49ed813f63
5 changed files with 86 additions and 19 deletions

View File

@@ -336,8 +336,14 @@
<update id="updateByskuId">
update tb_product_sku set real_sales_number = real_sales_number + #{num} where id = #{productSkuId}
</update>
<update id="updateByskuIdSub">
update tb_product_sku set stock_number = stock_number - #{num},real_sales_number = real_sales_number + #{num} where id = #{skuId}
</update>
<update id="updateStockNum" parameterType="java.lang.Integer">
update tb_product_sku set stock_number = 0 ,real_sales_number = real_sales_number + #{num} where id = #{skuId}
</update>
<select id="selectByShopIdAndProductIdAndSpec" resultMap="ResultMapWithBLOBs">
<select id="selectByShopIdAndProductIdAndSpec" resultMap="ResultMapWithBLOBs">
select * from tb_product_sku where shop_id=#{shopId} and product_id=#{productId}
<if test="spec != null and spec !=''">