phpcjl
2024-12-12 f9e5f51ae4fbe4f884b99cdcbd1ec1546c73e3cb
1.后台管理-评论
2.后台管理-门店特殊价
1个文件已修改
10 ■■■■■ 已修改文件
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -164,12 +164,20 @@
        goodsMapper.insert(goods);
        // 指定门店
        Integer appointStore = goods.getAppointStore();
        if (appointStore == 1){
        List<GoodsShop> goodsShopList = goods.getGoodsShopList();
            if (CollectionUtils.isEmpty(goodsShopList)){
                throw new NullPointerException("请选择指定门店");
            }
        goodsShopService.saveBatch(goodsShopList);
        }
        // 指定用户
        List<GoodsAppUser> goodsAppUserList = goods.getGoodsAppUserList();
        if (!CollectionUtils.isEmpty(goodsAppUserList)){
        goodsAppUserService.saveBatch(goodsAppUserList);
        }
        // 会员价格配置
        List<GoodsVip> goodsVipList = goods.getGoodsVipList();
@@ -177,8 +185,10 @@
        // 特殊地区售价设置
        List<GoodsArea> goodsAreaList = goods.getGoodsAreaList();
        if (!CollectionUtils.isEmpty(goodsAreaList)){
        goodsAreaService.saveBatch(goodsAreaList);
    }
    }
    @Override
    public void updateManageGoods(Goods goods) {