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

添加客户类别区分

parent 0a234638
......@@ -9,6 +9,7 @@ import com.quantgroup.asset.distribution.service.funding.IAidLoanFundConfigServi
import com.quantgroup.asset.distribution.service.httpclient.IHttpService;
import com.quantgroup.asset.distribution.service.jpa.entity.AidLoanFundConfig;
import com.quantgroup.asset.distribution.service.jpa.entity.AidLoanFundRouteRecord;
import com.quantgroup.asset.distribution.service.jpa.repository.ICustomerTypeRuleConfigRepository;
import com.quantgroup.asset.distribution.service.redis.IRedisService;
import com.quantgroup.asset.distribution.service.rule.IRuleService;
import com.quantgroup.asset.distribution.util.DateUtil;
......@@ -26,9 +27,7 @@ import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static com.quantgroup.asset.distribution.constant.RedisKeyConstants.AID_LOAN_ALL_AMOUNT_LIMIT_KEY;
import static com.quantgroup.asset.distribution.constant.RedisKeyConstants.AID_LOAN_COUNT_LIMIT_KEY;
import static com.quantgroup.asset.distribution.constant.RedisKeyConstants.FINISH_ROUTE_AID_FUND_KEY;
import static com.quantgroup.asset.distribution.constant.RedisKeyConstants.*;
/**
* Created by renfeng on 2019/7/19.
......@@ -48,11 +47,10 @@ public class AidFundRouteServiceImpl implements IAidFundRouteService {
@Autowired
private IRedisService<AssetForm> redisServiceAssetForm;
@Autowired
private IHttpService iHttpService;
@Autowired
private IRuleService ruleService;
@Autowired
private ICustomerTypeRuleConfigRepository iCustomerTypeRuleConfigRepository;
/**
* 助贷资金路由
......@@ -100,6 +98,7 @@ public class AidFundRouteServiceImpl implements IAidFundRouteService {
if(String.valueOf(aidLoanFundConfig.getFundId())
.equals(redisServiceAssetForm.getString(FINISH_ROUTE_AID_FUND_KEY + assetForm.getBizNo())))
continue;
//助贷资金分配规则校验
if(ruleService.valid(aidLoanFundConfig.getFundRuleEl(), data)){
//助贷资金准入接口调用
boolean accessResult = false;//todo 调用真实的准入接口
......@@ -121,6 +120,16 @@ public class AidFundRouteServiceImpl implements IAidFundRouteService {
log.info("主贷资金路由-准入完成, bizChannel : {} , uuid : {} , bizNo : {} , fundId : {} , 准入结果: {} ",assetForm.getBizChannel(),assetForm.getUuid(),assetForm.getBizNo(),aidLoanFundRouteRecord.getFundId(),accessResult);
if(accessResult){
//客户类别区分 1-自然流量 2-拒绝流量 留在这里 你我贷暂时不用 等以后要用时 随时可用
// int customerType = 0 ;
// List<CustomerTypeRuleConfig> byEnableTrue = iCustomerTypeRuleConfigRepository.findByEnableTrue();
// if(CollectionUtils.isNotEmpty(byEnableTrue)) {
// for (CustomerTypeRuleConfig customerTypeRuleConfig : byEnableTrue) {
// if (ruleService.valid(customerTypeRuleConfig.getCustomerTypeRuleEl(), data)) {
// customerType = customerTypeRuleConfig.getCustomerType();
// }
// }
// }
//todo 调用助贷资方进件接口 异步
log.info("主贷资金路由-进件完成, bizChannel : {} , uuid : {} , bizNo : {} , fundId : {} ",assetForm.getBizChannel(),assetForm.getUuid(),assetForm.getBizNo(),aidLoanFundRouteRecord.getFundId());
......
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