新客立减修改
This commit is contained in:
parent
d620ccf564
commit
b4fb2afd68
|
|
@ -53,7 +53,6 @@ public class MkConsumeDiscountDTO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 固定减免金额
|
* 固定减免金额
|
||||||
*/
|
*/
|
||||||
@DecimalMin(value = "0.01", message = "减免金额不能小于0.01")
|
|
||||||
private BigDecimal discountAmount;
|
private BigDecimal discountAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,14 @@ public class MkConsumeDiscountServiceImpl extends ServiceImpl<MkConsumeDiscountM
|
||||||
if (consumeDiscountDTO.getRandomDiscountList() == null || consumeDiscountDTO.getRandomDiscountList().isEmpty()) {
|
if (consumeDiscountDTO.getRandomDiscountList() == null || consumeDiscountDTO.getRandomDiscountList().isEmpty()) {
|
||||||
throw new ApiNotPrintException("随机优惠金额不能为空");
|
throw new ApiNotPrintException("随机优惠金额不能为空");
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
if (consumeDiscountDTO.getDiscountAmount() == null) {
|
||||||
|
throw new ApiNotPrintException("减免金额不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (consumeDiscountDTO.getDiscountAmount().compareTo(BigDecimal.ZERO) <= 0) {
|
||||||
|
throw new ApiNotPrintException("减免金额不能等于0");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MkConsumeDiscount consumeDiscount = getOne(new QueryWrapper().eq(MkConsumeDiscount::getShopId, shopId));
|
MkConsumeDiscount consumeDiscount = getOne(new QueryWrapper().eq(MkConsumeDiscount::getShopId, shopId));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue