Commit 6b6736b6 authored by 王向伟's avatar 王向伟

提现订单中添加是否展示还款计划的字段

parent 1c98b52b
...@@ -89,4 +89,9 @@ public class LoanOrder { ...@@ -89,4 +89,9 @@ public class LoanOrder {
* 放款银行名称 * 放款银行名称
*/ */
private String bankName; private String bankName;
/**
* 是否展示还款计划
*/
private Boolean showPlans;
} }
...@@ -73,6 +73,14 @@ public class OrderServiceImpl implements IOrderService { ...@@ -73,6 +73,14 @@ public class OrderServiceImpl implements IOrderService {
return JsonResult.buildErrorStateResult(loanOrder.getMsg(), loanOrder.getData()); return JsonResult.buildErrorStateResult(loanOrder.getMsg(), loanOrder.getData());
} }
LoanOrderDetail loanOrderDetail = new LoanOrderDetail();
LoanOrder loanOrderData = loanOrder.getData();
loanOrderDetail.setLoanOrder(loanOrderData);
if(Objects.isNull(loanOrderData) || !loanOrderData.getShowPlans()){
log.info("{} 不需查询还款计划",logPre);
return JsonResult.buildSuccessResult("查询成功",loanOrderDetail);
}
//还款计划查询 //还款计划查询
JsonResult<OrderRepayment> orderRepaymentJsonResult = xyqbService.repaymentPlanQuery(loanId); JsonResult<OrderRepayment> orderRepaymentJsonResult = xyqbService.repaymentPlanQuery(loanId);
...@@ -84,11 +92,8 @@ public class OrderServiceImpl implements IOrderService { ...@@ -84,11 +92,8 @@ public class OrderServiceImpl implements IOrderService {
List<Repayment> repaymentList = new ArrayList<>(); 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 loanOrderDetail = new LoanOrderDetail();
loanOrderDetail.setLoanOrder(loanOrder.getData());
loanOrderDetail.setRepaymentList(repaymentList); loanOrderDetail.setRepaymentList(repaymentList);
return JsonResult.buildSuccessResult("", loanOrderDetail); return JsonResult.buildSuccessResult("查询成功", loanOrderDetail);
} }
} }
...@@ -36,6 +36,7 @@ import com.google.common.collect.Maps; ...@@ -36,6 +36,7 @@ import com.google.common.collect.Maps;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -422,8 +423,13 @@ public class UserServiceImpl implements IUserService { ...@@ -422,8 +423,13 @@ public class UserServiceImpl implements IUserService {
return applyOrders; return applyOrders;
} }
UserBasicInfo userBasicInfo = userInfo.getData();
List<ApplyOrder> applyOrderList = applyOrders.getData(); List<ApplyOrder> applyOrderList = applyOrders.getData();
if(CollectionUtils.isEmpty(applyOrderList)){
log.error("{} 不存在对应的申请订单 param={}",logPre,userCombinationParam);
return JsonResult.buildErrorStateResult("申请订单不存在",null);
}
UserBasicInfo userBasicInfo = userInfo.getData();
//通过申请订单号获得渠道订单号 //通过申请订单号获得渠道订单号
List<String> applyOrderNoList = applyOrderList.stream().map(e -> e.getApplyOrderNo()).distinct().collect(Collectors.toList()); List<String> applyOrderNoList = applyOrderList.stream().map(e -> e.getApplyOrderNo()).distinct().collect(Collectors.toList());
JsonResult<Map<String, String>> mapJsonResult = kaService.findMap(applyOrderNoList); JsonResult<Map<String, String>> mapJsonResult = kaService.findMap(applyOrderNoList);
......
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