Commit e10e410a authored by 王向伟's avatar 王向伟

保证repaymentList传递给前端不为null

parent 6b6736b6
...@@ -74,8 +74,10 @@ public class OrderServiceImpl implements IOrderService { ...@@ -74,8 +74,10 @@ public class OrderServiceImpl implements IOrderService {
} }
LoanOrderDetail loanOrderDetail = new LoanOrderDetail(); LoanOrderDetail loanOrderDetail = new LoanOrderDetail();
List<Repayment> repaymentList = new ArrayList<>();
LoanOrder loanOrderData = loanOrder.getData(); LoanOrder loanOrderData = loanOrder.getData();
loanOrderDetail.setLoanOrder(loanOrderData); loanOrderDetail.setLoanOrder(loanOrderData);
loanOrderDetail.setRepaymentList(repaymentList);
if(Objects.isNull(loanOrderData) || !loanOrderData.getShowPlans()){ if(Objects.isNull(loanOrderData) || !loanOrderData.getShowPlans()){
log.info("{} 不需查询还款计划",logPre); log.info("{} 不需查询还款计划",logPre);
...@@ -89,10 +91,8 @@ public class OrderServiceImpl implements IOrderService { ...@@ -89,10 +91,8 @@ public class OrderServiceImpl implements IOrderService {
return JsonResult.buildErrorStateResult(orderRepaymentJsonResult.getMsg(), orderRepaymentJsonResult.getData()); return JsonResult.buildErrorStateResult(orderRepaymentJsonResult.getMsg(), orderRepaymentJsonResult.getData());
} }
List<Repayment> repaymentList = new ArrayList<>();
List<RepaymentPlanItem> repaymentPlans = orderRepaymentJsonResult.getData().getRepaymentPlans(); List<RepaymentPlanItem> repaymentPlans = orderRepaymentJsonResult.getData().getRepaymentPlans();
repaymentPlans.forEach(e -> repaymentList.add(Repayment.valueOf(e))); repaymentPlans.forEach(e -> repaymentList.add(Repayment.valueOf(e)));
loanOrderDetail.setRepaymentList(repaymentList);
return JsonResult.buildSuccessResult("查询成功", loanOrderDetail); return JsonResult.buildSuccessResult("查询成功", loanOrderDetail);
} }
......
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