Commit 83893877 authored by 杨钧's avatar 杨钧

展示xyqb返回错误msg

parent 1933257c
......@@ -190,10 +190,14 @@ public class OrderServiceImpl implements IOrderService {
// 请求xyqb
JsonResult<List<EarlySettleUpOrder>> xyqbOrderResult = this.xyqbService.findLoanOrder4EarlySettleUp(orderQuery);
if (Objects.isNull(xyqbOrderResult) || !xyqbOrderResult.isSuccess()) {
if (Objects.isNull(xyqbOrderResult)) {
return JsonResult.buildErrorStateResult("查询订单信息出错", null);
}
if(!xyqbOrderResult.isSuccess()){
return xyqbOrderResult;
}
/**
* 处理数据转换
*/
......@@ -325,11 +329,15 @@ public class OrderServiceImpl implements IOrderService {
String logPre = "OrderServiceImpl.earlySettleUpTrial";
JsonResult<EarlySettleUpTrial> jsonResult = this.xyqbService.earlySettleUpTrial(loanId);
if (Objects.isNull(jsonResult) || !jsonResult.isSuccess()) {
if (Objects.isNull(jsonResult)) {
log.error("{} 获取试算结果失败 loanId={}", logPre, loanId);
return JsonResult.buildErrorStateResult("获取试算结果失败", null);
}
if(!jsonResult.isSuccess()){
return JsonResult.buildErrorStateResult(jsonResult.getMsg(), null);
}
List<Map<String, Object>> data = dealWithFieldAndTitle(jsonResult.getData());
log.info("{} 试算对象 data={},试算后返回 datas:{}", logPre, jsonResult.getData(), data);
return JsonResult.buildSuccessResult("处理成功", data);
......
......@@ -396,9 +396,12 @@ public class XyqbServiceImpl implements IXyqbService {
TypeReference<JsonResult<List<EarlySettleUpOrder>>> typeToken = new TypeReference<JsonResult<List<EarlySettleUpOrder>>>() {
};
JsonResult<List<EarlySettleUpOrder>> jsonResult = JSONTools.deserialize(result, typeToken);
if (Objects.isNull(jsonResult) || !jsonResult.isSuccess()) {
return JsonResult.buildErrorStateResult("[查询失败]", ErrorCodeEnum.RETURN_ERROR);
if (Objects.isNull(jsonResult)) {
return JsonResult.buildErrorStateResult("操作失败,xyqb返回错误", Boolean.FALSE);
} else {
if(!jsonResult.isSuccess()){
return JsonResult.buildErrorStateResult(StringUtils.isNotBlank(jsonResult.getMsg())?jsonResult.getMsg():"操作失败,xyqb返回错误", Boolean.FALSE);
}
return jsonResult;
}
}
......@@ -475,10 +478,13 @@ public class XyqbServiceImpl implements IXyqbService {
TypeReference<JsonResult<EarlySettleUpTrial>> typeToken = new TypeReference<JsonResult<EarlySettleUpTrial>>() {
};
JsonResult<JsonResult<EarlySettleUpTrial>> jsonResult = JSONTools.deserialize(result, typeToken);
if (Objects.isNull(jsonResult) || !jsonResult.isSuccess()) {
return JsonResult.buildErrorStateResult("[处理失败]", null);
if (Objects.isNull(jsonResult)) {
return JsonResult.buildErrorStateResult("操作失败,xyqb返回错误", Boolean.FALSE);
} else {
return JsonResult.buildSuccessResult("[操作成功]", jsonResult.getData());
if(!jsonResult.isSuccess()){
return JsonResult.buildErrorStateResult(StringUtils.isNotBlank(jsonResult.getMsg())?jsonResult.getMsg():"操作失败,xyqb返回错误", Boolean.FALSE);
}
return JsonResult.buildSuccessResult("[操作成功]", Boolean.TRUE);
}
}
}
......
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