| | |
| | | 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(); |
| | |
| | | |
| | | // 特殊地区售价设置 |
| | | List<GoodsArea> goodsAreaList = goods.getGoodsAreaList(); |
| | | goodsAreaService.saveBatch(goodsAreaList); |
| | | if (!CollectionUtils.isEmpty(goodsAreaList)){ |
| | | goodsAreaService.saveBatch(goodsAreaList); |
| | | } |
| | | } |
| | | |
| | | @Override |