Commit ac50b4b11ce720b0aa432c5f1ad1a3c57d51ef97
1 parent
c6f67a5a
148 fix:商城系统->营销中心->优惠活动->限时折扣,折扣百分比按正常折扣(比如说90%)填写时,后端报错“折扣百分比需要大于等于 1,小于等于 99”
Showing
1 changed file
with
2 additions
and
2 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/discount/vo/DiscountActivityBaseVO.java
| ... | ... | @@ -63,11 +63,11 @@ public class DiscountActivityBaseVO { |
| 63 | 63 | @Min(value = 0, message = "优惠金额需要大于等于 0") |
| 64 | 64 | private Integer discountPrice; |
| 65 | 65 | |
| 66 | - @AssertTrue(message = "折扣百分比需要大于等于 1,小于等于 99") | |
| 66 | + @AssertTrue(message = "折扣百分比需要大于等于 0.01%,小于等于 99.99%") | |
| 67 | 67 | @JsonIgnore |
| 68 | 68 | public boolean isDiscountPercentValid() { |
| 69 | 69 | return ObjectUtil.notEqual(discountType, PromotionDiscountTypeEnum.PERCENT.getType()) |
| 70 | - || (discountPercent != null && discountPercent >= 1 && discountPercent<= 99); | |
| 70 | + || (discountPercent != null && discountPercent >= 1 && discountPercent <= 9999); | |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | @AssertTrue(message = "优惠金额不能为空") | ... | ... |