| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addGoods(Goods goods) { |
| | | goods.setSaleNum(0); |
| | | /* goods.setSaleNum(0); |
| | | goods.setStatus(GoodsStatus.DOWN.getCode()); |
| | | goodsMapper.insert(goods); |
| | | |
| | |
| | | throw new NullPointerException("请选择指定门店"); |
| | | } |
| | | saveGoodsShopList(goodsShopList, goods.getId()); |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | | @Override |
| | | public void updateManageGoods(Goods goods) { |
| | | this.updateById(goods); |
| | | /* this.updateById(goods); |
| | | //修改个别字段 |
| | | this.update(new LambdaUpdateWrapper<Goods>().eq(Goods::getId, goods.getId()).set(Goods::getSellingPrice, goods.getSellingPrice()) |
| | | .set(Goods::getIntegral, goods.getIntegral())); |
| | | // 指定门店 |
| | | List<GoodsShop> goodsShopList = goods.getGoodsShopList(); |
| | | saveGoodsShopList(goodsShopList, goods.getId()); |
| | | saveGoodsShopList(goodsShopList, goods.getId());*/ |
| | | } |
| | | |
| | | |
| | |
| | | goodsShop.setAddress(shop.getAddress()); |
| | | } |
| | | } |
| | | goods.setGoodsShopList(goodsShops); |
| | | // goods.setGoodsShopList(goodsShops); |
| | | return goods; |
| | | } |
| | | |