xiaoyong931011
2022-09-13 290da793c35d43b3b32be97643cf0b66f694ae84
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -148,7 +148,6 @@
                }
                MallGoods mallGoods = mallGoodsMapper.selectById(sku.getGoodsId());
                // 零撸专区购买
                if (new BigDecimal(mallGoods.getPresentPrice()).compareTo(BigDecimal.ZERO) == 0) {
                    List<MallOrderItem> items = mallOrderItemMapper.selectItemByGoodsIdUnCancel(mallGoods.getId(), member.getId());
@@ -161,6 +160,10 @@
                    throw new FebsException(mallGoods.getGoodsName() + "已下架");
                }
                mallGoods.setStock(mallGoods.getStock() - item.getCnt());
                mallGoods.setVolume(mallGoods.getVolume() + item.getCnt());
                mallGoodsMapper.updateById(mallGoods);
                BigDecimal amount = sku.getPresentPrice().multiply(BigDecimal.valueOf(item.getCnt()));
                orderItem.setAmount(amount);
                orderItem.setCnt(item.getCnt());