Commit cda41e2a authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev' into dev

parents eb379f69 a7c37982
...@@ -397,9 +397,14 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> { ...@@ -397,9 +397,14 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderInfo.setAmount(new BigDecimal(amount.get())); orderInfo.setAmount(new BigDecimal(amount.get()));
orderInfo.setNumber(number.get()); orderInfo.setNumber(number.get());
orderInfo.setTotalAmount(orderInfo.getAmount()); orderInfo.setTotalAmount(orderInfo.getAmount());
if (orderInfo.getAmount().compareTo(BigDecimal.ZERO) <= 0 || orderInfo.getTotalAmount().compareTo(BigDecimal.ZERO) <= 0) { if (orderInfo.getAmount().compareTo(BigDecimal.ZERO) < 0 || orderInfo.getTotalAmount().compareTo(BigDecimal.ZERO) < 0) {
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "订单金额不能为0"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "订单金额不能为0");
} }
if (orderInfo.getTotalAmount().compareTo(BigDecimal.ZERO) == 0) {
orderInfo.setStatus(OrderStatusEnum.ORDER_SEND.getType());
orderInfo.setPayStatus(2);
}
//订单发票信息 //订单发票信息
if (orderInfoDto.getUserInvoiceId() != null) { if (orderInfoDto.getUserInvoiceId() != null) {
UserInvoice userInvoice = userInvoiceBiz.selectById(orderInfoDto.getUserInvoiceId()); UserInvoice userInvoice = userInvoiceBiz.selectById(orderInfoDto.getUserInvoiceId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment