Pu Zhibing
9 天以前 9a03e46771f68bae27b172c561b6b6f49b5f0505
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
@@ -181,6 +181,7 @@
        if(shop!=null&&shop.getShopStatus()!=1){
            throw new ServiceException(AppErrorConstant.SHOP_CLOSED);
        }
        Shop belongShop = remoteShopService.getShop(shop.getBelongShopId()).getData();
        // 初始化订单对象
        AppSureOrderVo appSureOrderVo = new AppSureOrderVo();
        // 初始化订单商品列表
@@ -266,6 +267,14 @@
            ShopGoods shopGoods = remoteGoodsService.getShopGoods(appShopGoodsGetDto).getData();
            if (shopGoods != null) {
                goodsPrice = shopGoods.getSalesPrice();
            } else {
                //经销商定制价格
                appShopGoodsGetDto.setGoodsId(goods.getGoodsId());
                appShopGoodsGetDto.setShopId(belongShop.getShopId());
                shopGoods = remoteGoodsService.getShopGoods(appShopGoodsGetDto).getData();
                if (1 == belongShop.getModifyPricePermission() && null != shopGoods) {
                    goodsPrice = shopGoods.getSalesPrice();
                }
            }
            appSureOrderGoodsVo.setGoodsPrice(goodsPrice);
            buyNumBig = BigDecimal.valueOf(buyNum);
@@ -449,6 +458,16 @@
        ShopGoods shopGoods = remoteGoodsService.getShopGoods(appShopGoodsGetDto).getData();
        if (shopGoods != null) {
            goodsPrice = shopGoods.getSalesPrice();
        } else {
            //经销商定制价格
            Shop belongShop = remoteShopService.getShop(shop.getBelongShopId()).getData();
            appShopGoodsGetDto = new AppShopGoodsGetDto();
            appShopGoodsGetDto.setGoodsId(goods.getGoodsId());
            appShopGoodsGetDto.setShopId(belongShop.getShopId());
            shopGoods = remoteGoodsService.getShopGoods(appShopGoodsGetDto).getData();
            if (1 == belongShop.getModifyPricePermission() && null != shopGoods) {
                goodsPrice = shopGoods.getSalesPrice();
            }
        }
        appPanicBuyVo.setGoodsPrice(goodsPrice);
        buyNumBig = BigDecimal.valueOf(buyNum);
@@ -588,6 +607,18 @@
            if (shopGoods != null) {
                goodsPrice = shopGoods.getSalesPrice();
                serviceNum = shopGoods.getServiceNum();
            } else {
                //经销商定制价格
                Shop shop = remoteShopService.getShop(appPlaceOrderDto.getShopId()).getData();
                Shop belongShop = remoteShopService.getShop(shop.getBelongShopId()).getData();
                appShopGoodsGetDto = new AppShopGoodsGetDto();
                appShopGoodsGetDto.setGoodsId(goods.getGoodsId());
                appShopGoodsGetDto.setShopId(belongShop.getShopId());
                shopGoods = remoteGoodsService.getShopGoods(appShopGoodsGetDto).getData();
                if (1 == belongShop.getModifyPricePermission() && null != shopGoods) {
                    goodsPrice = shopGoods.getSalesPrice();
                    serviceNum = shopGoods.getServiceNum();
                }
            }
            appSureOrderGoodsVo.setGoodsPrice(goodsPrice);
            // 计算商品总价