Commit ceb05644 authored by data-爬虫-任锋's avatar data-爬虫-任锋

助贷资金路由添加日志

parent 8909822d
......@@ -83,20 +83,15 @@ public class AidFundRouteServiceImpl implements IAidFundRouteService {
//第五步 开始路由
if(CollectionUtils.isNotEmpty(aidLoanFundConfigList)){
log.info("助贷资金优先级筛选开始, uuid : {} , bizNo : {} ,助贷资金池 : {} ",assetForm.getUuid(),assetForm.getBizNo(),JSON.toJSONString(aidLoanFundConfigList));
//按优先级排序
TreeSet<AidLoanFundConfig> aidLoanFundConfigSet = new TreeSet<>(Comparator.comparing(AidLoanFundConfig::getFundPriority));
aidLoanFundConfigSet.addAll(aidLoanFundConfigList);
AidLoanFundConfig first = aidLoanFundConfigSet.first();
//通知资方
Map<String,String> response = iHttpService.postHasResponse(assetForm.getCallbackUrl(), assetForm.transToNotifyMap());
log.info("助贷资金筛选完成, uuid : {} , bizNo : {} ,助贷资金 : {} ",assetForm.getUuid(),assetForm.getBizNo(),JSON.toJSONString(first));
log.info("通知资金系统结束,response :{}, uuid : {} , bizNo : {} , callbackUrl:{},params:{}", JSON.toJSONString(response),assetForm.getUuid(),assetForm.getBizNo(),assetForm.getCallbackUrl(), JSON.toJSONString(assetForm));
if(response==null || response.size()==0 || !"200".equals(response.get("statusCode")) || "error".equals(response.get("response"))) {
assetForm.setRepeatCount(assetForm.getRepeatCount() + 1);
redisServiceAssetForm.rightPushEx("AID.LOAN.FUND.ROUTE.NOTIFY.83IUE",assetForm,1, TimeUnit.DAYS);
log.info("通知资金系统失败,response :{}, uuid : {} , bizNo : {} , callbackUrl:{},params:{}", JSON.toJSONString(response),assetForm.getUuid(),assetForm.getBizNo(),assetForm.getCallbackUrl(), JSON.toJSONString(assetForm));
}else {
//保存主贷资金路由记录
AidLoanFundRouteRecord aidLoanFundRouteRecord = new AidLoanFundRouteRecord();
aidLoanFundRouteRecord.setAidFundRouteStatus(1);//1-未完成 2-成功 3-失败
......@@ -108,7 +103,19 @@ public class AidFundRouteServiceImpl implements IAidFundRouteService {
aidLoanFundRouteRecord.setFundNo(first.getFundNo());
aidLoanFundRouteRecord.setFundId(first.getFundId());
iAidFundRouteRecordService.saveAidLoanFundRouteRecord(aidLoanFundRouteRecord);
//通知资方
Map<String,String> response = iHttpService.postHasResponse(assetForm.getCallbackUrl(), assetForm.transToNotifyMap());
log.info("通知资金系统结束,response :{}, uuid : {} , bizNo : {} , callbackUrl:{},params:{}", JSON.toJSONString(response),assetForm.getUuid(),assetForm.getBizNo(),assetForm.getCallbackUrl(), JSON.toJSONString(assetForm));
if(response==null || response.size()==0 || !"200".equals(response.get("statusCode")) || "error".equals(response.get("response"))) {
assetForm.setRepeatCount(assetForm.getRepeatCount() + 1);
redisServiceAssetForm.rightPushEx("AID.LOAN.FUND.ROUTE.NOTIFY.83IUE",assetForm,1, TimeUnit.DAYS);
log.info("通知资金系统失败,response :{}, uuid : {} , bizNo : {} , callbackUrl:{},params:{}", JSON.toJSONString(response),assetForm.getUuid(),assetForm.getBizNo(),assetForm.getCallbackUrl(), JSON.toJSONString(assetForm));
}
return GlobalResponse.success();
}
return GlobalResponse.error("未匹配到助贷资金");
}
......
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