陶杰
2024-12-16 7c8da7766dfe845c19847a9d5e8ec9b93d2a9392
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);