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
6b19e1b1
Commit
6b19e1b1
authored
Sep 26, 2021
by
技术部-韩成龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
筛选完成后没有可用的配置,则通知授信拒绝&补授信拒绝通知
parent
2421380b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
27 deletions
+31
-27
CoreFilter.java
...tgroup/asset/distribution/service/newrule/CoreFilter.java
+31
-27
No files found.
src/main/java/com/quantgroup/asset/distribution/service/newrule/CoreFilter.java
View file @
6b19e1b1
...
...
@@ -74,38 +74,42 @@ public class CoreFilter {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
coreHandle
(
AuditResponce
auditResponce
){
List
<
ChannelRuleEntity
>
channelRuleEntityList
;
UserAssociationBean
associationBean
=
userCenterService
.
getUserAssociationBean
(
auditResponce
.
getUuid
());
//白名单
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
(
"渠道配置产品集不存在,运营人员配置有问题"
);
}
FilterResult
result
=
new
FilterResult
();
List
<
FinanceProduct
>
financeProducts
=
new
ArrayList
<>();
List
<
RoutingRecordVO
>
routingRecordList
=
new
ArrayList
<>();
for
(
ChannelRuleEntity
channelRuleEntity
:
channelRuleEntityList
)
{
FundProductEntity
fundProduct
=
fundProductRepository
.
getByIdEquals
(
channelRuleEntity
.
getFundProductId
());
log
.
info
(
"coreHandle | 开始路由channelRuleEntity={}"
,
channelRuleEntity
.
toString
());
if
(
fundProduct
==
null
){
log
.
error
(
"这种情况不可能出现,需要看下原因 {}"
,
JSON
.
toJSONString
(
channelRuleEntity
));
continue
;
UserAssociationBean
associationBean
=
userCenterService
.
getUserAssociationBean
(
auditResponce
.
getUuid
());
if
(
auditResponce
.
getAuditResult
())
{
//白名单
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
(
currentVerify
(
fundProduct
,
auditResponce
,
associationBean
,
channelRuleEntity
)){
log
.
info
(
"coreHandle | 所有规则校验通过"
);
financeProducts
.
add
(
build
(
auditResponce
,
fundProduct
,
channelRuleEntity
));
routingRecordList
.
add
(
generateRouteRecord
(
channelRuleEntity
));
if
(
CollectionUtils
.
isEmpty
(
channelRuleEntityList
)){
throw
new
RuntimeException
(
"渠道配置产品集不存在,运营人员配置有问题"
);
}
for
(
ChannelRuleEntity
channelRuleEntity
:
channelRuleEntityList
)
{
FundProductEntity
fundProduct
=
fundProductRepository
.
getByIdEquals
(
channelRuleEntity
.
getFundProductId
());
log
.
info
(
"coreHandle | 开始路由channelRuleEntity={}"
,
channelRuleEntity
.
toString
());
if
(
fundProduct
==
null
){
log
.
error
(
"这种情况不可能出现,需要看下原因 {}"
,
JSON
.
toJSONString
(
channelRuleEntity
));
continue
;
}
if
(
currentVerify
(
fundProduct
,
auditResponce
,
associationBean
,
channelRuleEntity
)){
log
.
info
(
"coreHandle | 所有规则校验通过"
);
financeProducts
.
add
(
build
(
auditResponce
,
fundProduct
,
channelRuleEntity
));
routingRecordList
.
add
(
generateRouteRecord
(
channelRuleEntity
));
}
}
if
(
CollectionUtils
.
isEmpty
(
financeProducts
))
{
log
.
error
(
"筛选完成后没有可用的配置, bizNo:{}"
,
auditResponce
.
getBizNo
());
auditResponce
.
setAuditResult
(
false
);
}
else
{
result
.
setFinanceProducts
(
JSON
.
toJSONString
(
financeProducts
));
}
}
if
(
CollectionUtils
.
isEmpty
(
financeProducts
))
{
throw
new
RuntimeException
(
"筛选完成后没有可用的配置"
);
}
FilterResult
result
=
new
FilterResult
();
result
.
setFinanceProducts
(
JSON
.
toJSONString
(
financeProducts
));
log
.
info
(
"coreHandle | 通知业务系统审核结果"
);
Map
<
String
,
String
>
response
=
httpService
.
postHasResponse
(
auditResponce
.
getCallbackUrl
(),
result
.
get
(
auditResponce
));
if
(
MapUtils
.
isEmpty
(
response
)
||
!(
HttpStatus
.
OK
.
value
()
+
""
).
equals
(
response
.
get
(
"statusCode"
))
...
...
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