|
|
@@ -614,11 +614,11 @@ public class KwoTradeOrderService {
|
|
|
|
|
|
|
|
|
private void checkParams(UpdateOrderParam param, String source) {
|
|
|
- if (Objects.isNull(param.getAmount())) {
|
|
|
- throw new BusinessException("订单总量不能为空!");
|
|
|
+ if (Objects.isNull(param.getAmount()) || param.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ throw new BusinessException("订单总量不能为空且必须大于零!");
|
|
|
}
|
|
|
- if (Objects.isNull(param.getPrice())) {
|
|
|
- throw new BusinessException("订单金额不能为空!");
|
|
|
+ if (Objects.isNull(param.getPrice()) || param.getPrice().compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ throw new BusinessException("订单金额不能为空且必须大于零!");
|
|
|
}
|
|
|
if (StringUtils.isBlank(param.getTrading())) {
|
|
|
throw new BusinessException("交易方式不能为空!");
|
|
|
@@ -643,18 +643,6 @@ public class KwoTradeOrderService {
|
|
|
if (Objects.isNull(contractInfo.getContractId())) {
|
|
|
throw new BusinessException("合同id不能为空!");
|
|
|
}
|
|
|
- if (StringUtils.isBlank(contractInfo.getContractNo())) {
|
|
|
- throw new BusinessException("合同编号不能为空!");
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(contractInfo.getContractName())) {
|
|
|
- throw new BusinessException("合同名称不能为空!");
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(contractInfo.getContractSigningWay())) {
|
|
|
- throw new BusinessException("合同签约方式不能为空!");
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(contractInfo.getContractStatus())) {
|
|
|
- throw new BusinessException("合同状态不能为空!");
|
|
|
- }
|
|
|
}
|
|
|
GoodsInfo goodsInfo = param.getGoodsInfo();
|
|
|
if (Objects.isNull(goodsInfo)) {
|