Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
99b60a40
Commit
99b60a40
authored
Sep 27, 2021
by
技术部-韩成龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
白名单匹配
parent
e9388ec7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
20 deletions
+26
-20
IWhiteListRepository.java
...ribution/service/jpa/repository/IWhiteListRepository.java
+2
-0
CoreFilter.java
...tgroup/asset/distribution/service/newrule/CoreFilter.java
+24
-20
No files found.
src/main/java/com/quantgroup/asset/distribution/service/jpa/repository/IWhiteListRepository.java
View file @
99b60a40
...
@@ -8,5 +8,7 @@ import org.springframework.data.querydsl.QueryDslPredicateExecutor;
...
@@ -8,5 +8,7 @@ import org.springframework.data.querydsl.QueryDslPredicateExecutor;
public
interface
IWhiteListRepository
extends
JpaRepository
<
WhiteListEntity
,
Long
>,
QueryDslPredicateExecutor
<
WhiteListEntity
>
{
public
interface
IWhiteListRepository
extends
JpaRepository
<
WhiteListEntity
,
Long
>,
QueryDslPredicateExecutor
<
WhiteListEntity
>
{
WhiteListEntity
getByPhoneEquals
(
String
phone
);
WhiteListEntity
getByPhoneEquals
(
String
phone
);
WhiteListEntity
getByPhoneEqualsAndStatusEqualsAndFundProIdEquals
(
String
phone
,
Byte
status
,
Long
fundProId
);
WhiteListEntity
getByPhoneEqualsAndFundIdEqualsAndFundProIdEquals
(
String
phone
,
Long
fundId
,
Long
fundProId
);
WhiteListEntity
getByPhoneEqualsAndFundIdEqualsAndFundProIdEquals
(
String
phone
,
Long
fundId
,
Long
fundProId
);
}
}
src/main/java/com/quantgroup/asset/distribution/service/newrule/CoreFilter.java
View file @
99b60a40
...
@@ -96,28 +96,28 @@ public class CoreFilter {
...
@@ -96,28 +96,28 @@ public class CoreFilter {
//白名单
//白名单
WhiteListEntity
whiteListEntity
=
whiteListRepository
.
getByPhoneEquals
(
associationBean
.
getPhoneNo
());
WhiteListEntity
whiteListEntity
=
whiteListRepository
.
getByPhoneEquals
(
associationBean
.
getPhoneNo
());
if
(
whiteListEntity
!=
null
&&
whiteListEntity
.
getStatus
().
equals
(
Byte
.
valueOf
(
"1"
)))
{
if
(
whiteListEntity
!=
null
&&
whiteListEntity
.
getStatus
().
equals
(
Byte
.
valueOf
(
"1"
)))
{
log
.
info
(
"白名单用户,phoneNo:{}"
,
associationBean
.
getPhoneNo
());
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdAndFundProductIdOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
whiteListEntity
.
getFundProductId
());
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdAndFundProductIdOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
whiteListEntity
.
getFundProductId
());
}
else
{
}
else
{
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()));
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()));
}
}
if
(
CollectionUtils
.
isEmpty
(
channelRuleEntityList
))
{
if
(
CollectionUtils
.
isEmpty
(
channelRuleEntityList
))
{
throw
new
RuntimeException
(
"渠道配置产品集不存在,运营人员配置有问题"
);
log
.
error
(
"渠道配置产品集不存在,运营人员配置有问题, bizNo:{}"
,
auditResponce
.
getBizNo
());
}
}
else
{
for
(
ChannelRuleEntity
channelRuleEntity
:
channelRuleEntityList
)
{
for
(
ChannelRuleEntity
channelRuleEntity
:
channelRuleEntityList
)
{
if
(
channelRuleEntity
.
getPublishStatus
().
equals
(
0
))
{
if
(
channelRuleEntity
.
getPublishStatus
().
equals
(
0
))
{
continue
;
continue
;
}
}
FundProductEntity
fundProduct
=
fundProductRepository
.
getByIdEquals
(
channelRuleEntity
.
getFundProductId
());
FundProductEntity
fundProduct
=
fundProductRepository
.
getByIdEquals
(
channelRuleEntity
.
getFundProductId
());
log
.
info
(
"coreHandle | 开始路由channelRuleEntity={}"
,
channelRuleEntity
.
toString
());
log
.
info
(
"coreHandle | 开始路由channelRuleEntity={}"
,
channelRuleEntity
.
toString
());
if
(
fundProduct
==
null
)
{
if
(
fundProduct
==
null
)
{
log
.
error
(
"这种情况不可能出现,需要看下原因 {}"
,
JSON
.
toJSONString
(
channelRuleEntity
));
log
.
error
(
"这种情况不可能出现,需要看下原因 {}"
,
JSON
.
toJSONString
(
channelRuleEntity
));
continue
;
continue
;
}
}
if
(
currentVerify
(
fundProduct
,
auditResponce
,
associationBean
,
channelRuleEntity
))
{
if
(
currentVerify
(
fundProduct
,
auditResponce
,
associationBean
,
channelRuleEntity
))
{
log
.
info
(
"coreHandle | 所有规则校验通过"
);
log
.
info
(
"coreHandle | 所有规则校验通过"
);
financeProducts
.
add
(
build
(
auditResponce
,
fundProduct
,
channelRuleEntity
));
financeProducts
.
add
(
build
(
auditResponce
,
fundProduct
,
channelRuleEntity
));
routingRecordList
.
add
(
generateRouteRecord
(
channelRuleEntity
));
routingRecordList
.
add
(
generateRouteRecord
(
channelRuleEntity
));
}
}
}
}
}
if
(
CollectionUtils
.
isEmpty
(
financeProducts
))
{
if
(
CollectionUtils
.
isEmpty
(
financeProducts
))
{
...
@@ -154,8 +154,8 @@ public class CoreFilter {
...
@@ -154,8 +154,8 @@ public class CoreFilter {
routingRecordRepository
.
save
(
routingRecordEntity
);
routingRecordRepository
.
save
(
routingRecordEntity
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"资金路由分发出现异常, uuid : {}, bizChannel : {}, bizType : {}, bizNo : {} "
,
auditResponce
.
getUuid
(),
log
.
error
(
"资金路由分发出现异常, uuid : {}, bizChannel : {}, bizType : {}, bizNo : {}
e:{}
"
,
auditResponce
.
getUuid
(),
auditResponce
.
getBizChannel
(),
auditResponce
.
getBizType
());
auditResponce
.
getBizChannel
(),
auditResponce
.
getBizType
()
,
ExceptionUtils
.
getStackTrace
(
e
)
);
distributeFailLogService
.
saveDistributeFailLogNew
(
auditResponce
,
ExceptionUtils
.
getMessage
(
e
));
distributeFailLogService
.
saveDistributeFailLogNew
(
auditResponce
,
ExceptionUtils
.
getMessage
(
e
));
alarmService
.
dingtalkAlarm
(
"Warn"
,
"资金路由分发出现异常"
,
"bizChannel : "
+
auditResponce
.
getBizChannel
()
alarmService
.
dingtalkAlarm
(
"Warn"
,
"资金路由分发出现异常"
,
"bizChannel : "
+
auditResponce
.
getBizChannel
()
+
" , bizType : "
+
auditResponce
.
getBizType
()
+
" , bizNo : "
+
auditResponce
.
getBizNo
()
+
" , bizType : "
+
auditResponce
.
getBizType
()
+
" , bizNo : "
+
auditResponce
.
getBizNo
()
...
@@ -193,7 +193,11 @@ public class CoreFilter {
...
@@ -193,7 +193,11 @@ public class CoreFilter {
if
(
fundProduct
.
getEnable
().
equals
(
new
Byte
(
"0"
)))
{
if
(
fundProduct
.
getEnable
().
equals
(
new
Byte
(
"0"
)))
{
return
Boolean
.
FALSE
;
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
);
Boolean
basicInfoVerify
=
basicInfoVerify
(
fundProduct
,
associationBean
,
auditResponce
,
channelRuleEntity
);
if
(
whiteListEntity
!=
null
&&
basicInfoVerify
)
{
if
(
whiteListEntity
!=
null
&&
basicInfoVerify
)
{
log
.
info
(
"currentVerify | 走白名单"
);
log
.
info
(
"currentVerify | 走白名单"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment