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

助贷资金路由添加日志

parent 8909822d
......@@ -83,11 +83,27 @@ 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();
log.info("助贷资金筛选完成, uuid : {} , bizNo : {} ,助贷资金 : {} ",assetForm.getUuid(),assetForm.getBizNo(),JSON.toJSONString(first));
//保存主贷资金路由记录
AidLoanFundRouteRecord aidLoanFundRouteRecord = new AidLoanFundRouteRecord();
aidLoanFundRouteRecord.setAidFundRouteStatus(1);//1-未完成 2-成功 3-失败
aidLoanFundRouteRecord.setAssetNo(assetForm.getAssetNo());
aidLoanFundRouteRecord.setBizChannel(assetForm.getBizChannel());
aidLoanFundRouteRecord.setBizNo(assetForm.getBizNo());
aidLoanFundRouteRecord.setFinanceProductType(Integer.parseInt(assetForm.getBizType()));
aidLoanFundRouteRecord.setUserLoanType(userLoanType);
aidLoanFundRouteRecord.setFundNo(first.getFundNo());
aidLoanFundRouteRecord.setFundId(first.getFundId());
iAidFundRouteRecordService.saveAidLoanFundRouteRecord(aidLoanFundRouteRecord);
//通知资方
Map<String,String> response = iHttpService.postHasResponse(assetForm.getCallbackUrl(), assetForm.transToNotifyMap());
......@@ -96,19 +112,10 @@ public class AidFundRouteServiceImpl implements IAidFundRouteService {
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-失败
aidLoanFundRouteRecord.setAssetNo(assetForm.getAssetNo());
aidLoanFundRouteRecord.setBizChannel(assetForm.getBizChannel());
aidLoanFundRouteRecord.setBizNo(assetForm.getBizNo());
aidLoanFundRouteRecord.setFinanceProductType(Integer.parseInt(assetForm.getBizType()));
aidLoanFundRouteRecord.setUserLoanType(userLoanType);
aidLoanFundRouteRecord.setFundNo(first.getFundNo());
aidLoanFundRouteRecord.setFundId(first.getFundId());
iAidFundRouteRecordService.saveAidLoanFundRouteRecord(aidLoanFundRouteRecord);
}
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