1.耗材check值错误修复

This commit is contained in:
SongZhang 2024-08-17 15:00:46 +08:00
parent cee4643925
commit 61157d730c
3 changed files with 4 additions and 4 deletions

View File

@ -315,7 +315,8 @@ public class OrderService {
* @param productSku sku
*/
private void checkWarnLineAndSendMsg(TbProductSku productSku, TbProduct product, Integer shopId, Integer num) {
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(shopId);
log.info("下单,开始校验库存预警,商品信息:{}, {}, {}", product, productSku, num);
if (productSku.getWarnLine() == null) {
return;
}
@ -565,7 +566,6 @@ public class OrderService {
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
TbProductSkuWithBLOBs skuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId()));
log.info("下单,开始校验库存预警,购物车id:{}", cashierCart.getId());
CompletableFuture.runAsync(() -> checkWarnLineAndSendMsg(skuWithBLOBs, product, Integer.valueOf(cashierCart.getShopId()), cashierCart.getNumber()));
// 已经添加的商品修改数量

View File

@ -126,7 +126,7 @@
<select id="selectBySkuIdAndShopIdAngCheck" resultMap="BaseResultMap">
select a.* from tb_prosku_con as a
left join tb_cons_info as b on a.con_info_id=b.id
where a.product_sku_id=#{skuId} and a.shop_id=#{shopId} and a.status=1 and b.is_check=0
where a.product_sku_id=#{skuId} and a.shop_id=#{shopId} and a.status=1 and b.is_check=1
</select>
<select id="selectIdBySkuIdAndShopId" resultType="java.lang.Integer">