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
58f69cb1
Commit
58f69cb1
authored
Sep 28, 2021
by
鹿朋
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fund_route' of
http://git.quantgroup.cn/data-spider/asset-server
into fund_route
parents
eec5a9f5
d4b50d3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
25 deletions
+29
-25
UserTag.java
...om/quantgroup/asset/distribution/enums/route/UserTag.java
+3
-2
CoreFilter.java
...tgroup/asset/distribution/service/newrule/CoreFilter.java
+26
-6
AuditResponce.java
...set/distribution/service/newrule/third/AuditResponce.java
+0
-17
No files found.
src/main/java/com/quantgroup/asset/distribution/enums/route/UserTag.java
View file @
58f69cb1
...
@@ -12,8 +12,9 @@ public enum UserTag {
...
@@ -12,8 +12,9 @@ public enum UserTag {
INITIAL_APPLICATION
(
"INITIAL_APPLICATION"
,
"首申"
),
INITIAL_APPLICATION
(
"INITIAL_APPLICATION"
,
"首申"
),
REAPPLICATION
(
"REAPPLICATION"
,
"复申"
),
REAPPLICATION
(
"REAPPLICATION"
,
"复申"
),
RE_LOAN
(
"RE_LOAN"
,
"复贷"
),
RE_LOAN
(
"RE_LOAN"
,
"复贷"
),
NO_ABLES
(
"NO_ABLES"
,
"无标签"
),
// NO_ABLES("NO_ABLES","无标签"),
OTHERS
(
"OTHERS"
,
"其他"
);
// OTHERS("OTHERS","其他"),
;
private
String
value
;
private
String
value
;
...
...
src/main/java/com/quantgroup/asset/distribution/service/newrule/CoreFilter.java
View file @
58f69cb1
...
@@ -90,7 +90,7 @@ public class CoreFilter {
...
@@ -90,7 +90,7 @@ public class CoreFilter {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
coreHandle
(
AuditResponce
auditResponce
)
{
public
void
coreHandle
(
AuditResponce
auditResponce
)
{
try
{
try
{
List
<
ChannelRuleEntity
>
channelRuleEntityList
;
List
<
ChannelRuleEntity
>
channelRuleEntityList
=
new
ArrayList
<>()
;
FilterResult
result
=
new
FilterResult
();
FilterResult
result
=
new
FilterResult
();
List
<
FinanceProduct
>
financeProducts
=
new
ArrayList
<>();
List
<
FinanceProduct
>
financeProducts
=
new
ArrayList
<>();
List
<
RoutingRecordVO
>
routingRecordList
=
new
ArrayList
<>();
List
<
RoutingRecordVO
>
routingRecordList
=
new
ArrayList
<>();
...
@@ -98,9 +98,10 @@ public class CoreFilter {
...
@@ -98,9 +98,10 @@ 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"
)))
{
channelRuleEntityList
=
channelRuleRepository
if
(
auditResponce
.
getAuditResult
())
{
.
getByChannelIdAndFundProductIdAndCreditResultOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
ChannelRuleEntity
channelRuleEntity
=
buildFakeChannelRule
(
whiteListEntity
,
auditResponce
);
whiteListEntity
.
getFundProductId
(),
auditResponce
.
getAuditResult
()
?
1
:
0
);
channelRuleEntityList
.
add
(
channelRuleEntity
);
}
}
else
{
}
else
{
channelRuleEntityList
=
channelRuleRepository
channelRuleEntityList
=
channelRuleRepository
.
getByChannelIdAndCreditResultOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
.
getByChannelIdAndCreditResultOrderByPriority
(
Long
.
parseLong
(
auditResponce
.
getBizChannel
()),
...
@@ -161,7 +162,7 @@ public class CoreFilter {
...
@@ -161,7 +162,7 @@ public class CoreFilter {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"资金路由分发出现异常, uuid : {}, bizChannel : {}, bizType : {}, bizNo : {} e:{}"
,
auditResponce
.
getUuid
(),
log
.
error
(
"资金路由分发出现异常, uuid : {}, bizChannel : {}, bizType : {}, bizNo : {} e:{}"
,
auditResponce
.
getUuid
(),
auditResponce
.
getBizChannel
(),
auditResponce
.
getBizType
(),
ExceptionUtils
.
getStackTrace
(
e
));
auditResponce
.
getBizChannel
(),
auditResponce
.
getBizType
(),
auditResponce
.
getBizNo
(),
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
()
...
@@ -170,6 +171,25 @@ public class CoreFilter {
...
@@ -170,6 +171,25 @@ public class CoreFilter {
}
}
}
}
private
ChannelRuleEntity
buildFakeChannelRule
(
WhiteListEntity
white
,
AuditResponce
auditResult
)
{
ChannelRuleEntity
ruleEntity
=
new
ChannelRuleEntity
();
ruleEntity
.
setEnable
(
true
);
ruleEntity
.
setPublishStatus
(
1
);
ruleEntity
.
setFundProductId
(
white
.
getFundProductId
());
ruleEntity
.
setBusinessType
(
white
.
getBusinessType
());
ruleEntity
.
setChannelId
(
Long
.
valueOf
(
auditResult
.
getBizChannel
()));
ruleEntity
.
setCreditResult
(
1
);
ruleEntity
.
setFundId
(
white
.
getFundId
());
ruleEntity
.
setFundName
(
white
.
getFundName
());
ruleEntity
.
setFundProId
(
white
.
getFundProId
());
ruleEntity
.
setId
(-
9999L
);
ruleEntity
.
setOrgType
(
white
.
getOrgType
());
ruleEntity
.
setPriority
(
1
);
ruleEntity
.
setRouteWait
(
false
);
ruleEntity
.
setFundType
(
white
.
getFundType
());
return
ruleEntity
;
}
private
RoutingRecordVO
generateRouteRecord
(
ChannelRuleEntity
channelRuleEntity
)
{
private
RoutingRecordVO
generateRouteRecord
(
ChannelRuleEntity
channelRuleEntity
)
{
RoutingRecordVO
routingRecordVO
=
new
RoutingRecordVO
();
RoutingRecordVO
routingRecordVO
=
new
RoutingRecordVO
();
BeanUtils
.
copyProperties
(
channelRuleEntity
,
routingRecordVO
);
BeanUtils
.
copyProperties
(
channelRuleEntity
,
routingRecordVO
);
...
@@ -247,7 +267,7 @@ public class CoreFilter {
...
@@ -247,7 +267,7 @@ public class CoreFilter {
}
}
String
userTag
=
String
.
valueOf
(
data
.
get
(
AssetAttributeConstants
.
USER_LOAN_TYPE_V4
));
String
userTag
=
String
.
valueOf
(
data
.
get
(
AssetAttributeConstants
.
USER_LOAN_TYPE_V4
));
if
(!
ruleUserTag
.
contains
(
userTag
))
{
if
(!
ruleUserTag
.
contains
(
userTag
))
{
log
.
error
(
"UserTag不符, 特征userTag:{},配置userTag"
,
userTag
,
ruleUserTag
);
log
.
error
(
"UserTag不符, 特征userTag:{},配置userTag
:{}
"
,
userTag
,
ruleUserTag
);
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
}
}
...
...
src/main/java/com/quantgroup/asset/distribution/service/newrule/third/AuditResponce.java
View file @
58f69cb1
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
newrule
.
third
;
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
newrule
.
third
;
import
com.quantgroup.asset.distribution.enums.route.UserTag
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
...
@@ -124,21 +122,6 @@ public class AuditResponce {
...
@@ -124,21 +122,6 @@ public class AuditResponce {
*/
*/
private
String
specialUserList
;
private
String
specialUserList
;
private
String
userTag
;
private
String
assetNo
;
private
String
assetNo
;
public
String
getUserTag
()
{
if
(!
NumberUtils
.
isCreatable
(
userTag
))
{
return
userTag
;
}
UserTag
[]
tags
=
UserTag
.
values
();
for
(
UserTag
tag
:
tags
)
{
if
(
Integer
.
valueOf
(
userTag
).
equals
(
tag
.
ordinal
()))
{
return
tag
.
getValue
();
}
}
return
UserTag
.
OTHERS
.
getValue
();
}
}
}
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