陶杰
2024-12-26 c6e9715b6e593738abf1a35e49c1bbac0966f3a4
src/main/java/com/mzl/flower/service/flower/FlowerService.java
@@ -479,6 +479,13 @@
        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);
@@ -724,9 +731,9 @@
                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());
                }
                }*/
            }
        }
    }