Commit 99b60a40 authored by 技术部-韩成龙's avatar 技术部-韩成龙

白名单匹配

parent e9388ec7
......@@ -8,5 +8,7 @@ import org.springframework.data.querydsl.QueryDslPredicateExecutor;
public interface IWhiteListRepository extends JpaRepository<WhiteListEntity, Long>, QueryDslPredicateExecutor<WhiteListEntity> {
WhiteListEntity getByPhoneEquals(String phone);
WhiteListEntity getByPhoneEqualsAndStatusEqualsAndFundProIdEquals(String phone, Byte status, Long fundProId);
WhiteListEntity getByPhoneEqualsAndFundIdEqualsAndFundProIdEquals(String phone,Long fundId,Long fundProId);
}
......@@ -96,14 +96,13 @@ public class CoreFilter {
//白名单
WhiteListEntity whiteListEntity = whiteListRepository.getByPhoneEquals(associationBean.getPhoneNo());
if (whiteListEntity != null && whiteListEntity.getStatus().equals(Byte.valueOf("1"))) {
log.info("白名单用户,phoneNo:{}", associationBean.getPhoneNo());
channelRuleEntityList = channelRuleRepository.getByChannelIdAndFundProductIdOrderByPriority(Long.parseLong(auditResponce.getBizChannel()), whiteListEntity.getFundProductId());
} else {
channelRuleEntityList = channelRuleRepository.getByChannelIdOrderByPriority(Long.parseLong(auditResponce.getBizChannel()));
}
if (CollectionUtils.isEmpty(channelRuleEntityList)) {
throw new RuntimeException("渠道配置产品集不存在,运营人员配置有问题");
}
log.error("渠道配置产品集不存在,运营人员配置有问题, bizNo:{}", auditResponce.getBizNo());
} else {
for (ChannelRuleEntity channelRuleEntity : channelRuleEntityList) {
if (channelRuleEntity.getPublishStatus().equals(0)) {
continue;
......@@ -120,6 +119,7 @@ public class CoreFilter {
routingRecordList.add(generateRouteRecord(channelRuleEntity));
}
}
}
if (CollectionUtils.isEmpty(financeProducts)) {
log.error("筛选完成后没有可用的配置, bizNo:{}", auditResponce.getBizNo());
auditResponce.setAuditResult(false);
......@@ -154,8 +154,8 @@ public class CoreFilter {
routingRecordRepository.save(routingRecordEntity);
}
} catch (Exception e) {
log.error("资金路由分发出现异常, uuid : {}, bizChannel : {}, bizType : {}, bizNo : {} ", auditResponce.getUuid(),
auditResponce.getBizChannel(), auditResponce.getBizType());
log.error("资金路由分发出现异常, uuid : {}, bizChannel : {}, bizType : {}, bizNo : {} e:{}", auditResponce.getUuid(),
auditResponce.getBizChannel(), auditResponce.getBizType(), ExceptionUtils.getStackTrace(e));
distributeFailLogService.saveDistributeFailLogNew(auditResponce, ExceptionUtils.getMessage(e));
alarmService.dingtalkAlarm("Warn", "资金路由分发出现异常", "bizChannel : " + auditResponce.getBizChannel()
+ " , bizType : " + auditResponce.getBizType() + " , bizNo : " + auditResponce.getBizNo()
......@@ -193,7 +193,11 @@ public class CoreFilter {
if (fundProduct.getEnable().equals(new Byte("0"))) {
return Boolean.FALSE;
}
WhiteListEntity whiteListEntity = whiteListRepository.getByPhoneEquals(associationBean.getPhoneNo());
WhiteListEntity whiteListEntity = whiteListRepository.getByPhoneEqualsAndStatusEqualsAndFundProIdEquals(associationBean.getPhoneNo(),
new Byte("1"), fundProduct.getFundProId());
if (whiteListEntity != null) {
log.info("白名单用户,phoneNo:{}", associationBean.getPhoneNo());
}
Boolean basicInfoVerify = basicInfoVerify(fundProduct, associationBean, auditResponce, channelRuleEntity);
if (whiteListEntity != null && basicInfoVerify) {
log.info("currentVerify | 走白名单");
......
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