| | |
| | | if(flower == null){ |
| | | throw new ValidationException("商品未找到"); |
| | | } |
| | | if (flower.getStatus().equals(Constants.FLOWER_STATUS.UP.name())) { |
| | | throw new ValidationException("上架商品无法删除"); |
| | | } |
| | | |
| | | if (flower.getStatus().equals(Constants.FLOWER_STATUS.PENDING.name())) { |
| | | throw new ValidationException("待审核商品无法删除"); |
| | | } |
| | | |
| | | flowerMapper.deleteById(id); |
| | | |
| | |
| | | s.setCollection(s.getCollectCount() > 0); |
| | | s.setShopnum(s.getShopnum() == null ? 0 : s.getShopnum()); |
| | | |
| | | if(s.getSales() != null && s.getRealSales() != null){ |
| | | /*if(s.getSales() != null && s.getRealSales() != null){ |
| | | s.setSales(s.getSales() + s.getRealSales()); |
| | | } |
| | | }*/ |
| | | } |
| | | } |
| | | } |