|
|
|
@ -38,7 +38,8 @@ public class BillServiceImp implements BillService { |
|
|
|
if(!Optional.ofNullable(queryResult).isPresent()){ |
|
|
|
throw new BusinessException(ErrorConstant.BILL_INVALID); |
|
|
|
} |
|
|
|
if(queryResult.getPayAmount().compareTo(queryResult.getTotalAmount()) >= 0) |
|
|
|
BigDecimal payAmount = Optional.ofNullable(queryResult.getPayAmount()).orElse(BigDecimal.ZERO); |
|
|
|
if(payAmount.compareTo(queryResult.getTotalAmount()) >= 0) |
|
|
|
throw new BusinessException(ErrorConstant.BILL_COMPLETE_PAYMENT); |
|
|
|
orderBO.setAmount(queryResult.getTotalAmount()); |
|
|
|
List<SaleBill> saleBillList = new ArrayList<>(); |
|
|
|
|