gongzuming
2024-09-22 7302e3c9e686ab0d404e936e7e324b314deca1b3
src/main/java/com/mzl/flower/web/v2/coupon/CouponTemplateUserController.java
@@ -46,7 +46,7 @@
    public ResponseEntity<ReturnDataDTO> create(@Validated @RequestBody CreateCouponTemplateUserDTO dto) {
        if (dto.getCouponDiscountType().equals(CouponTypeEnum.DISCOUNT.getType()) && dto.getMinOrderAmount().compareTo(dto.getCouponDiscountValue()) < 0) {
            throw new ValidationException("订单金额不能小于折扣金额");
            throw new ValidationException("优惠券使用条件不能小于面值金额");
        }
        if (dto.getCouponDiscountType().equals(CouponTypeEnum.ZERO.getType()) && dto.getMinOrderAmount().compareTo(BigDecimal.ZERO) != 0) {
@@ -78,7 +78,7 @@
        dto.setId(id);
        if (dto.getCouponDiscountType().equals(CouponTypeEnum.DISCOUNT.getType()) && dto.getMinOrderAmount().compareTo(dto.getCouponDiscountValue()) < 0) {
            throw new ValidationException("订单金额不能小于折扣金额");
            throw new ValidationException("优惠券使用条件不能小于面值金额");
        }
        if (dto.getCouponDiscountType().equals(CouponTypeEnum.ZERO.getType()) && dto.getMinOrderAmount().compareTo(BigDecimal.ZERO) != 0) {