1.耗材check值错误修复
This commit is contained in:
parent
cee4643925
commit
61157d730c
|
|
@ -315,7 +315,8 @@ public class OrderService {
|
||||||
* @param productSku sku
|
* @param productSku sku
|
||||||
*/
|
*/
|
||||||
private void checkWarnLineAndSendMsg(TbProductSku productSku, TbProduct product, Integer shopId, Integer num) {
|
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) {
|
if (productSku.getWarnLine() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -565,7 +566,6 @@ public class OrderService {
|
||||||
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||||
TbProductSkuWithBLOBs skuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId()));
|
TbProductSkuWithBLOBs skuWithBLOBs = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId()));
|
||||||
|
|
||||||
log.info("下单,开始校验库存预警,购物车id:{}", cashierCart.getId());
|
|
||||||
CompletableFuture.runAsync(() -> checkWarnLineAndSendMsg(skuWithBLOBs, product, Integer.valueOf(cashierCart.getShopId()), cashierCart.getNumber()));
|
CompletableFuture.runAsync(() -> checkWarnLineAndSendMsg(skuWithBLOBs, product, Integer.valueOf(cashierCart.getShopId()), cashierCart.getNumber()));
|
||||||
|
|
||||||
// 已经添加的商品,修改数量
|
// 已经添加的商品,修改数量
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
<select id="selectBySkuIdAndShopIdAngCheck" resultMap="BaseResultMap">
|
<select id="selectBySkuIdAndShopIdAngCheck" resultMap="BaseResultMap">
|
||||||
select a.* from tb_prosku_con as a
|
select a.* from tb_prosku_con as a
|
||||||
left join tb_cons_info as b on a.con_info_id=b.id
|
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>
|
||||||
|
|
||||||
<select id="selectIdBySkuIdAndShopId" resultType="java.lang.Integer">
|
<select id="selectIdBySkuIdAndShopId" resultType="java.lang.Integer">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue