|
|
@@ -50,8 +50,8 @@ public class GiftCardGoodsSkuServiceImpl extends ServiceImpl<GiftCardGoodsSkuMap
|
|
|
BigDecimal cash = data.getCash();
|
|
|
Integer gcType = data.getGcType();
|
|
|
BigDecimal price = data.getPrice();
|
|
|
- if (price == null || price.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
- throw BusinessRuntimeException.getInstance("请输入正确的礼品卡配置价格");
|
|
|
+ if (price == null || price.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("请输入正确的礼品卡价格");
|
|
|
}
|
|
|
Long gcSkuId = data.getGcSkuId();
|
|
|
if (gcSkuId == null && cash == null) {
|
|
|
@@ -62,8 +62,8 @@ public class GiftCardGoodsSkuServiceImpl extends ServiceImpl<GiftCardGoodsSkuMap
|
|
|
throw BusinessRuntimeException.getInstance("只能选择一种礼品卡类型");
|
|
|
}
|
|
|
if (cash != null) {
|
|
|
- if (cash.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
- throw BusinessRuntimeException.getInstance("请输入正确的礼品卡现金类型金额");
|
|
|
+ if (cash.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("请输入正确的礼品卡价格");
|
|
|
}
|
|
|
gcType = 1;
|
|
|
}
|