|
|
@ -61,13 +61,13 @@ public class CashCollectionServiceImpl implements CashCollectionService { |
|
|
if (cashCollection.getJwcode() < 10000000 || cashCollection.getJwcode() > 99999999) { |
|
|
if (cashCollection.getJwcode() < 10000000 || cashCollection.getJwcode() > 99999999) { |
|
|
throw new IllegalArgumentException("精网号必须为8位"); |
|
|
throw new IllegalArgumentException("精网号必须为8位"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getName() == null) { |
|
|
|
|
|
|
|
|
if (cashCollection.getName() == null || cashCollection.getName().isEmpty()){ |
|
|
throw new IllegalArgumentException("客户姓名不能为空"); |
|
|
throw new IllegalArgumentException("客户姓名不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getActivity() == null) { |
|
|
|
|
|
|
|
|
if (cashCollection.getActivity() == null || cashCollection.getActivity().isEmpty()) { |
|
|
throw new IllegalArgumentException("活动不能为空"); |
|
|
throw new IllegalArgumentException("活动不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getGoodsName() == null) { |
|
|
|
|
|
|
|
|
if (cashCollection.getGoodsName() == null|| cashCollection.getGoodsName().isEmpty()) { |
|
|
throw new IllegalArgumentException("商品名不能为空"); |
|
|
throw new IllegalArgumentException("商品名不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getGoodsName().equals("金币充值")) { |
|
|
if (cashCollection.getGoodsName().equals("金币充值")) { |
|
|
@ -79,20 +79,20 @@ public class CashCollectionServiceImpl implements CashCollectionService { |
|
|
if (cashCollection.getGoodNum() == 0) { |
|
|
if (cashCollection.getGoodNum() == 0) { |
|
|
throw new IllegalArgumentException("产品数量不能为空"); |
|
|
throw new IllegalArgumentException("产品数量不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getNumUnit() == null) { |
|
|
|
|
|
|
|
|
if (cashCollection.getNumUnit() == null|| cashCollection.getNumUnit().isEmpty()) { |
|
|
throw new IllegalArgumentException("数量单位不能为空"); |
|
|
throw new IllegalArgumentException("数量单位不能为空"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (cashCollection.getPaymentCurrency() == null) { |
|
|
|
|
|
|
|
|
if (cashCollection.getPaymentCurrency() == null || cashCollection.getPaymentCurrency().isEmpty()) { |
|
|
throw new IllegalArgumentException("支付币种不能为空"); |
|
|
throw new IllegalArgumentException("支付币种不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getPaymentAmount() == null || cashCollection.getPaymentAmount().compareTo(BigDecimal.ZERO) == 0) { |
|
|
if (cashCollection.getPaymentAmount() == null || cashCollection.getPaymentAmount().compareTo(BigDecimal.ZERO) == 0) { |
|
|
throw new IllegalArgumentException("支付金额不能为空"); |
|
|
throw new IllegalArgumentException("支付金额不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getPayType() == null) { |
|
|
|
|
|
|
|
|
if (cashCollection.getPayType() == null|| cashCollection.getPayType().isEmpty()) { |
|
|
throw new IllegalArgumentException("支付方式不能为空"); |
|
|
throw new IllegalArgumentException("支付方式不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getReceivedMarket() == null) { |
|
|
|
|
|
|
|
|
if (cashCollection.getReceivedMarket() == null||cashCollection.getReceivedMarket().isEmpty()) { |
|
|
throw new IllegalArgumentException("到账地区不能为空"); |
|
|
throw new IllegalArgumentException("到账地区不能为空"); |
|
|
} |
|
|
} |
|
|
if (cashCollection.getPayTime() == null) { |
|
|
if (cashCollection.getPayTime() == null) { |
|
|
|