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
2a6fd6e9
Commit
2a6fd6e9
authored
Sep 25, 2021
by
王业雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ae662675
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
CoreFilter.java
...tgroup/asset/distribution/service/newrule/CoreFilter.java
+3
-4
FundProductServiceImpl.java
...stribution/service/route/impl/FundProductServiceImpl.java
+12
-2
No files found.
src/main/java/com/quantgroup/asset/distribution/service/newrule/CoreFilter.java
View file @
2a6fd6e9
...
@@ -39,10 +39,7 @@ import shaded.com.google.common.collect.Lists;
...
@@ -39,10 +39,7 @@ import shaded.com.google.common.collect.Lists;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author shihuajun
* @author shihuajun
...
@@ -85,6 +82,7 @@ public class CoreFilter {
...
@@ -85,6 +82,7 @@ public class CoreFilter {
List
<
RoutingRecordVO
>
routingRecordList
=
new
ArrayList
<>();
List
<
RoutingRecordVO
>
routingRecordList
=
new
ArrayList
<>();
for
(
ChannelRuleEntity
channelRuleEntity
:
channelRuleEntityList
)
{
for
(
ChannelRuleEntity
channelRuleEntity
:
channelRuleEntityList
)
{
FundProductEntity
fundProduct
=
fundProductRepository
.
getByIdEquals
(
channelRuleEntity
.
getFundProductId
());
FundProductEntity
fundProduct
=
fundProductRepository
.
getByIdEquals
(
channelRuleEntity
.
getFundProductId
());
log
.
info
(
"coreHandle | 开始路由channelRuleEntity={}"
,
channelRuleEntity
);
if
(
fundProduct
==
null
){
if
(
fundProduct
==
null
){
log
.
error
(
"这种情况不可能出现,需要看下原因 {}"
,
JSON
.
toJSONString
(
channelRuleEntity
));
log
.
error
(
"这种情况不可能出现,需要看下原因 {}"
,
JSON
.
toJSONString
(
channelRuleEntity
));
continue
;
continue
;
...
@@ -250,4 +248,5 @@ public class CoreFilter {
...
@@ -250,4 +248,5 @@ public class CoreFilter {
}
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
}
}
src/main/java/com/quantgroup/asset/distribution/service/route/impl/FundProductServiceImpl.java
View file @
2a6fd6e9
...
@@ -269,7 +269,7 @@ public class FundProductServiceImpl implements IFundProductService {
...
@@ -269,7 +269,7 @@ public class FundProductServiceImpl implements IFundProductService {
allByEnableEquals
.
stream
().
forEach
(
productRuleEntity
->
{
allByEnableEquals
.
stream
().
forEach
(
productRuleEntity
->
{
String
value
=
ruleValueMap
.
get
(
productRuleEntity
.
getId
());
String
value
=
ruleValueMap
.
get
(
productRuleEntity
.
getId
());
if
(!
StringUtils
.
isEmpty
(
value
)){
if
(!
StringUtils
.
isEmpty
(
value
)){
//10 <= age && age <= 50 && 10 <= amount && amount <= 20000 &&
term == 12
&& ! include(not_permit_tels,tel)
//10 <= age && age <= 50 && 10 <= amount && amount <= 20000 &&
(term == 12 || term == 11)
&& ! include(not_permit_tels,tel)
switch
(
productRuleEntity
.
getRuleVal
()){
switch
(
productRuleEntity
.
getRuleVal
()){
case
"age"
:
case
"age"
:
basicRule
.
append
(
value
.
replace
(
","
,
" <= age && age <= "
)).
append
(
" && "
);
basicRule
.
append
(
value
.
replace
(
","
,
" <= age && age <= "
)).
append
(
" && "
);
...
@@ -278,7 +278,17 @@ public class FundProductServiceImpl implements IFundProductService {
...
@@ -278,7 +278,17 @@ public class FundProductServiceImpl implements IFundProductService {
basicRule
.
append
(
value
.
replace
(
","
,
" <= amount && amount <= "
)).
append
(
" && "
);
basicRule
.
append
(
value
.
replace
(
","
,
" <= amount && amount <= "
)).
append
(
" && "
);
break
;
break
;
case
"term"
:
case
"term"
:
basicRule
.
append
(
"term == "
).
append
(
value
).
append
(
" && "
);
basicRule
.
append
(
"("
);
String
[]
split
=
value
.
split
(
","
);
for
(
int
i
=
0
;
i
<
split
.
length
;
i
++){
basicRule
.
append
(
"term == "
).
append
(
split
[
i
]);
if
(
i
!=
split
.
length
-
1
){
basicRule
.
append
(
" || "
);
}
}
basicRule
.
append
(
")"
);
//basicRule.append("term == ").append(value).append(" && ");
break
;
break
;
case
"not_permit_tels"
:
case
"not_permit_tels"
:
basicRule
.
append
(
"! include(not_permit_tels,tel)"
).
append
(
" && "
);
basicRule
.
append
(
"! include(not_permit_tels,tel)"
).
append
(
" && "
);
...
...
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