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

无数据的情况按照正确处理

parent 73eba5e5
...@@ -81,7 +81,7 @@ public class KaServiceImpl implements IKaService { ...@@ -81,7 +81,7 @@ public class KaServiceImpl implements IKaService {
if (StringUtils.isBlank(result)) { if (StringUtils.isBlank(result)) {
log.error("{} 查询orderMapping失败 jsonResult={}", logPre, result); log.error("{} 查询orderMapping失败 jsonResult={}", logPre, result);
return JsonResult.buildErrorStateResult("查询orderMapping失败", null); return JsonResult.buildErrorStateResult("查询数据异常", null);
} }
TypeReference<JsonResult<LoanOrderMapping>> typeToken = new TypeReference<JsonResult<LoanOrderMapping>>() { TypeReference<JsonResult<LoanOrderMapping>> typeToken = new TypeReference<JsonResult<LoanOrderMapping>>() {
}; };
......
...@@ -354,13 +354,12 @@ public class UserServiceImpl implements IUserService { ...@@ -354,13 +354,12 @@ public class UserServiceImpl implements IUserService {
if (orderParam + userParam == 0) { if (orderParam + userParam == 0) {
result.setValue("参数不能为空"); result.setValue("参数不能为空");
return result; return result;
}else if(orderParam + userParam > 1){ } else if (orderParam + userParam > 1) {
result.setValue("只能选择一个参数进行查询"); result.setValue("只能选择一个参数进行查询");
return result; return result;
} }
//分类参数验证 订单参数优先 //分类参数验证 订单参数优先
if (orderParam == 1) { if (orderParam == 1) {
result.setKey(true); result.setKey(true);
...@@ -497,9 +496,12 @@ public class UserServiceImpl implements IUserService { ...@@ -497,9 +496,12 @@ public class UserServiceImpl implements IUserService {
StringUtils.isNotBlank(orderQueryParam.getApplyOrderNo())) { StringUtils.isNotBlank(orderQueryParam.getApplyOrderNo())) {
//通过ka获得userId然后通过userId查询 //通过ka获得userId然后通过userId查询
JsonResult<LoanOrderMapping> orderMapping = kaService.findOrderMapping(orderQueryParam); JsonResult<LoanOrderMapping> orderMapping = kaService.findOrderMapping(orderQueryParam);
if (!orderMapping.isSuccess() || Objects.isNull(orderMapping.getData())) { if (!orderMapping.isSuccess()) {
log.error("{} 查询orderMapping失败 param={} result={}", logPre, orderQueryParam, orderMapping); log.error("{} 查询orderMapping失败 param={} result={}", logPre, orderQueryParam, orderMapping);
return JsonResult.buildErrorStateResult("查询orderMapping失败", null); return JsonResult.buildErrorStateResult("查询失败", null);
}
if (Objects.isNull(orderMapping.getData())) {
return JsonResult.buildSuccessResult("无数据,请用其他参数查询", null);
} }
Long qgUserId = orderMapping.getData().getQgUserId(); Long qgUserId = orderMapping.getData().getQgUserId();
UserSysResult<XUserDetail> userDetailByUserId = userSdk.getService().findUserDetailByUserId(qgUserId); UserSysResult<XUserDetail> userDetailByUserId = userSdk.getService().findUserDetailByUserId(qgUserId);
......
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