phpcjl
2024-12-12 f9e5f51ae4fbe4f884b99cdcbd1ec1546c73e3cb
1.后台管理-评论
2.后台管理-门店特殊价
1个文件已修改
18 ■■■■ 已修改文件
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -164,12 +164,20 @@
        goodsMapper.insert(goods);
        // 指定门店
        List<GoodsShop> goodsShopList = goods.getGoodsShopList();
        goodsShopService.saveBatch(goodsShopList);
        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();
        goodsAppUserService.saveBatch(goodsAppUserList);
        if (!CollectionUtils.isEmpty(goodsAppUserList)){
            goodsAppUserService.saveBatch(goodsAppUserList);
        }
        // 会员价格配置
        List<GoodsVip> goodsVipList = goods.getGoodsVipList();
@@ -177,7 +185,9 @@
        // 特殊地区售价设置
        List<GoodsArea> goodsAreaList = goods.getGoodsAreaList();
        goodsAreaService.saveBatch(goodsAreaList);
        if (!CollectionUtils.isEmpty(goodsAreaList)){
            goodsAreaService.saveBatch(goodsAreaList);
        }
    }
    @Override