|
@@ -219,8 +219,9 @@ public class CmsGoodsDonSkuController {
|
|
|
goodsDonSku.setSpecVal(specVal);
|
|
goodsDonSku.setSpecVal(specVal);
|
|
|
goodsDonSku.setSpecJson(specJson);
|
|
goodsDonSku.setSpecJson(specJson);
|
|
|
if (goods.getType() == 1) {
|
|
if (goods.getType() == 1) {
|
|
|
- if (sku.getMonths() != null && sku.getDays() != null)
|
|
|
|
|
|
|
+ if (sku.getMonths() != null && sku.getMonths() > 0 && sku.getDays() != null && sku.getDays() > 0) {
|
|
|
throw BusinessRuntimeException.getInstance("续费天数和续费月数不能同时存在");
|
|
throw BusinessRuntimeException.getInstance("续费天数和续费月数不能同时存在");
|
|
|
|
|
+ }
|
|
|
if (sku.getMonths() == null && sku.getDays() == null)
|
|
if (sku.getMonths() == null && sku.getDays() == null)
|
|
|
throw BusinessRuntimeException.getInstance("请输入对应续费时间");
|
|
throw BusinessRuntimeException.getInstance("请输入对应续费时间");
|
|
|
}
|
|
}
|
|
@@ -250,8 +251,9 @@ public class CmsGoodsDonSkuController {
|
|
|
Long goodsId = sku.getGoodsId();
|
|
Long goodsId = sku.getGoodsId();
|
|
|
GoodsDon goods = goodsDonService.getById(goodsId);
|
|
GoodsDon goods = goodsDonService.getById(goodsId);
|
|
|
if (goods.getType() == 1) {
|
|
if (goods.getType() == 1) {
|
|
|
- if (sku.getMonths() != null && sku.getDays() != null)
|
|
|
|
|
|
|
+ if (sku.getMonths() != null && sku.getMonths() > 0 && sku.getDays() != null && sku.getDays() > 0) {
|
|
|
throw BusinessRuntimeException.getInstance("续费天数和续费月数不能同时存在");
|
|
throw BusinessRuntimeException.getInstance("续费天数和续费月数不能同时存在");
|
|
|
|
|
+ }
|
|
|
if (sku.getMonths() == null && sku.getDays() == null)
|
|
if (sku.getMonths() == null && sku.getDays() == null)
|
|
|
throw BusinessRuntimeException.getInstance("请输入对应续费时间");
|
|
throw BusinessRuntimeException.getInstance("请输入对应续费时间");
|
|
|
}
|
|
}
|