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
dbfb2a03
Commit
dbfb2a03
authored
Sep 27, 2021
by
技术部-韩成龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风控层-授信结果校验
parent
99b60a40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
36 deletions
+40
-36
IChannelRuleRepository.java
...bution/service/jpa/repository/IChannelRuleRepository.java
+2
-2
CoreFilter.java
...tgroup/asset/distribution/service/newrule/CoreFilter.java
+38
-34
No files found.
src/main/java/com/quantgroup/asset/distribution/service/jpa/repository/IChannelRuleRepository.java
View file @
dbfb2a03
...
@@ -9,7 +9,7 @@ import java.util.List;
...
@@ -9,7 +9,7 @@ import java.util.List;
public
interface
IChannelRuleRepository
extends
JpaRepository
<
ChannelRuleEntity
,
Long
>,
QueryDslPredicateExecutor
<
ChannelRuleEntity
>
{
public
interface
IChannelRuleRepository
extends
JpaRepository
<
ChannelRuleEntity
,
Long
>,
QueryDslPredicateExecutor
<
ChannelRuleEntity
>
{
ChannelRuleEntity
getByFundProductIdEquals
(
long
fundProductId
);
ChannelRuleEntity
getByFundProductIdEquals
(
long
fundProductId
);
List
<
ChannelRuleEntity
>
getByChannelId
OrderByPriority
(
long
channelId
);
List
<
ChannelRuleEntity
>
getByChannelId
AndCreditResultOrderByPriority
(
long
channelId
,
Integer
creditResult
);
List
<
ChannelRuleEntity
>
getAllByEnableEquals
(
Boolean
enable
);
List
<
ChannelRuleEntity
>
getAllByEnableEquals
(
Boolean
enable
);
...
@@ -19,5 +19,5 @@ public interface IChannelRuleRepository extends JpaRepository<ChannelRuleEntity,
...
@@ -19,5 +19,5 @@ public interface IChannelRuleRepository extends JpaRepository<ChannelRuleEntity,
void
deleteAllByChannelIdEqualsAndEnableEquals
(
Long
channelId
,
Boolean
enable
);
void
deleteAllByChannelIdEqualsAndEnableEquals
(
Long
channelId
,
Boolean
enable
);
List
<
ChannelRuleEntity
>
getByChannelIdAndFundProductId
OrderByPriority
(
long
channelId
,
long
fundProductId
);
List
<
ChannelRuleEntity
>
getByChannelIdAndFundProductId
AndCreditResultOrderByPriority
(
long
channelId
,
long
fundProductId
,
Integer
creditResult
);
}
}
src/main/java/com/quantgroup/asset/distribution/service/newrule/CoreFilter.java
View file @
dbfb2a03
...
@@ -92,13 +92,16 @@ public class CoreFilter {
...
@@ -92,13 +92,16 @@ public class CoreFilter {
List
<
FinanceProduct
>
financeProducts
=
new
ArrayList
<>();
List
<
FinanceProduct
>
financeProducts
=
new
ArrayList
<>();
List
<
RoutingRecordVO
>
routingRecordList
=
new
ArrayList
<>();
List
<
RoutingRecordVO
>
routingRecordList
=
new
ArrayList
<>();
UserAssociationBean
associationBean
=
userCenterService
.
getUserAssociationBean
(
auditResponce
.
getUuid
());
UserAssociationBean
associationBean
=
userCenterService
.
getUserAssociationBean
(
auditResponce
.
getUuid
());
if
(
auditResponce
.
getAuditResult
())
{
//白名单
//白名单
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"
)))
{
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdAndFundProductIdOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
whiteListEntity
.
getFundProductId
());
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdAndFundProductIdAndCreditResultOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
whiteListEntity
.
getFundProductId
(),
auditResponce
.
getAuditResult
()
?
1
:
0
);
}
else
{
}
else
{
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()));
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdAndCreditResultOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
auditResponce
.
getAuditResult
()
?
1
:
0
);
}
}
if
(
CollectionUtils
.
isEmpty
(
channelRuleEntityList
))
{
if
(
CollectionUtils
.
isEmpty
(
channelRuleEntityList
))
{
log
.
error
(
"渠道配置产品集不存在,运营人员配置有问题, bizNo:{}"
,
auditResponce
.
getBizNo
());
log
.
error
(
"渠道配置产品集不存在,运营人员配置有问题, bizNo:{}"
,
auditResponce
.
getBizNo
());
...
@@ -125,7 +128,7 @@ public class CoreFilter {
...
@@ -125,7 +128,7 @@ public class CoreFilter {
auditResponce
.
setAuditResult
(
false
);
auditResponce
.
setAuditResult
(
false
);
}
else
{
}
else
{
result
.
setFinanceProducts
(
JSON
.
toJSONString
(
financeProducts
));
result
.
setFinanceProducts
(
JSON
.
toJSONString
(
financeProducts
));
}
auditResponce
.
setAuditResult
(
true
);
}
}
log
.
info
(
"coreHandle | 通知业务系统审核结果"
);
log
.
info
(
"coreHandle | 通知业务系统审核结果"
);
Map
<
String
,
String
>
response
=
httpService
.
postHasResponse
(
auditResponce
.
getCallbackUrl
(),
result
.
get
(
auditResponce
));
Map
<
String
,
String
>
response
=
httpService
.
postHasResponse
(
auditResponce
.
getCallbackUrl
(),
result
.
get
(
auditResponce
));
...
@@ -217,14 +220,15 @@ public class CoreFilter {
...
@@ -217,14 +220,15 @@ public class CoreFilter {
log
.
error
(
"channelId不符"
);
log
.
error
(
"channelId不符"
);
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
//如果配置不为空,则匹配参数是否符合
//如果配置不为空,则匹配参数是否符合
if
(
StringUtils
.
isNotBlank
(
channelRuleEntity
.
getUserLevel
())
if
(
StringUtils
.
isNotBlank
(
channelRuleEntity
.
getUserLevel
())
&&
!
channelRuleEntity
.
getUserLevel
().
contains
(
auditResponce
.
getCreditLevel
(
)))
{
&&
(
StringUtils
.
isEmpty
(
auditResponce
.
getCreditLevel
())
||
!
channelRuleEntity
.
getUserLevel
().
contains
(
auditResponce
.
getCreditLevel
()
)))
{
log
.
error
(
"CreditLevel不符 userLevel:{}"
,
auditResponce
.
getCreditLevel
());
log
.
error
(
"CreditLevel不符 userLevel:{}"
,
auditResponce
.
getCreditLevel
());
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
if
(
StringUtils
.
isNotBlank
(
channelRuleEntity
.
getUserTag
())
if
(
StringUtils
.
isNotBlank
(
channelRuleEntity
.
getUserTag
())
&&
!
channelRuleEntity
.
getUserTag
().
contains
(
auditResponce
.
getUserTag
(
)))
{
&&
(
StringUtils
.
isEmpty
(
auditResponce
.
getUserTag
())
||
!
channelRuleEntity
.
getUserTag
().
contains
(
auditResponce
.
getUserTag
()
)))
{
log
.
error
(
"UserTag不符, userTag:{}"
,
auditResponce
.
getUserTag
());
log
.
error
(
"UserTag不符, userTag:{}"
,
auditResponce
.
getUserTag
());
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
...
...
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