148 fix:商城系统->营销中心->优惠活动->限时折扣,折扣百分比按正常折扣(比如说90%)填写时,后端报错“折扣百分比需要大于等于 1,小于等于 99”
This commit is contained in:
parent
c6f67a5a02
commit
ac50b4b11c
|
@ -63,11 +63,11 @@ public class DiscountActivityBaseVO {
|
||||||
@Min(value = 0, message = "优惠金额需要大于等于 0")
|
@Min(value = 0, message = "优惠金额需要大于等于 0")
|
||||||
private Integer discountPrice;
|
private Integer discountPrice;
|
||||||
|
|
||||||
@AssertTrue(message = "折扣百分比需要大于等于 1,小于等于 99")
|
@AssertTrue(message = "折扣百分比需要大于等于 0.01%,小于等于 99.99%")
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean isDiscountPercentValid() {
|
public boolean isDiscountPercentValid() {
|
||||||
return ObjectUtil.notEqual(discountType, PromotionDiscountTypeEnum.PERCENT.getType())
|
return ObjectUtil.notEqual(discountType, PromotionDiscountTypeEnum.PERCENT.getType())
|
||||||
|| (discountPercent != null && discountPercent >= 1 && discountPercent<= 99);
|
|| (discountPercent != null && discountPercent >= 1 && discountPercent <= 9999);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AssertTrue(message = "优惠金额不能为空")
|
@AssertTrue(message = "优惠金额不能为空")
|
||||||
|
|
Loading…
Reference in New Issue