From 9b58253767ba7f90313a46bdd93f28fef137cb7e Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 16 Sep 2022 11:51:15 +0800
Subject: [PATCH] 20220902
---
src/main/resources/mapper/modules/MallGoodsMapper.xml | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/modules/MallGoodsMapper.xml b/src/main/resources/mapper/modules/MallGoodsMapper.xml
index b401ffd..697cbed 100644
--- a/src/main/resources/mapper/modules/MallGoodsMapper.xml
+++ b/src/main/resources/mapper/modules/MallGoodsMapper.xml
@@ -264,4 +264,11 @@
from mall_goods_comment a limit 1
</select>
+ <update id="upDateStockAndVolumeByGoodsId">
+ update mall_goods
+ set stock = stock - #{cnt},
+ volume = volume + #{cnt}
+ where id=#{id} and stock - #{cnt} <![CDATA[ >= ]]> 0
+ </update>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1