Helius
2022-09-23 7c6f033b8754b07bf5c75ae8745a982d76f9abb4
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -100,6 +100,9 @@
        //订单范围内才允许下单
        MallAddressInfo address = mallAddressInfoMapper.selectAddressInfoByMemberIdAndId(member.getId(), addOrderDto.getAddressId());
        if(ObjectUtil.isEmpty(address)){
            throw new FebsException("请重新选择提货人信息");
        }
//        MallElectronicFence mallElectronicFence = mallElectronicFenceMapper.selectByTeamLeaderCode(mallTeamLeader.getUniqueCode());
//        if(ObjectUtil.isNotEmpty(mallElectronicFence)){
//            String inStr = iMallElectronicFenceService.fenceToLocation(mallElectronicFence.getGKey(),
@@ -709,9 +712,9 @@
                        throw new FebsException("购买商品或sku不存在");
                    }
                    if (sku.getStock() < mallOrderItem.getCnt()) {
                        throw new FebsException(sku.getSkuName() + "库存不足");
                    }
//                    if (sku.getStock() < mallOrderItem.getCnt()) {
//                        throw new FebsException(sku.getSkuName() + "库存不足");
//                    }
                    MallGoods mallGoods = mallGoodsMapper.selectById(sku.getGoodsId());
                    Integer goodsResult = mallGoodsMapper.updateStockAndVolumeByGoodsId(mallGoods.getId(), mallOrderItem.getCnt());