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
7e9b38be
Commit
7e9b38be
authored
Apr 08, 2020
by
zhengjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6.6-2
parent
8bff8218
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
FundModuleServiceImpl.java
...tribution/service/funding/impl/FundModuleServiceImpl.java
+10
-6
No files found.
src/main/java/com/quantgroup/asset/distribution/service/funding/impl/FundModuleServiceImpl.java
View file @
7e9b38be
...
...
@@ -9,6 +9,7 @@ import java.util.stream.Collectors;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.quantgroup.asset.distribution.enums.RuleOperator
;
import
com.quantgroup.asset.distribution.enums.UnionType
;
import
com.quantgroup.asset.distribution.exception.QGException
;
import
com.quantgroup.asset.distribution.model.entity.fund.ChannelFundConfigNew
;
import
com.quantgroup.asset.distribution.model.entity.fund.FundConfigCondition
;
...
...
@@ -227,7 +228,7 @@ public class FundModuleServiceImpl implements IFundModuleService{
List
<
BaseRuleVO
>
baseRuleList
=
new
ArrayList
<>();
for
(
ChannelFundConfigNew
channelFundConfig
:
fundConfigList
)
{
IRuleVO
ruleVO
=
ruleService
.
getIRuleVo
(
channelFundConfig
.
getLimits
());
baseRuleList
.
addAll
(
getAllBaseRule
(
ruleVO
)
);
getAllBaseRule
(
baseRuleList
,
ruleVO
);
}
Map
<
String
,
List
<
String
>>
keyValueMap
=
collectValueMap
(
baseRuleList
);
//去掉相同的值 例如 amount>3000 和amount>=3000在生成案例时 3001都可以满足 此时会有两个3001
...
...
@@ -348,15 +349,18 @@ public class FundModuleServiceImpl implements IFundModuleService{
return
GlobalResponse
.
success
(
vo
);
}
private
static
List
<
BaseRuleVO
>
getAllBaseRule
(
IRuleVO
ruleVO
){
List
<
BaseRuleVO
>
baseRuleList
=
new
ArrayList
<>();
private
static
void
getAllBaseRule
(
List
<
BaseRuleVO
>
ruleVOList
,
IRuleVO
ruleVO
){
if
(
ruleVO
.
getClass
().
isAssignableFrom
(
UnionRuleVO
.
class
)){
UnionRuleVO
uRuleVo
=
(
UnionRuleVO
)
ruleVO
;
baseRuleList
=
uRuleVo
.
getBaseRules
();
ruleVOList
.
addAll
(
uRuleVo
.
getBaseRules
());
if
(
CollectionUtils
.
isNotEmpty
(
uRuleVo
.
getUnionRules
())){
for
(
UnionRuleVO
vo
:
uRuleVo
.
getUnionRules
()){
getAllBaseRule
(
ruleVOList
,
vo
);
}
}
}
else
{
baseRule
List
.
add
((
BaseRuleVO
)
ruleVO
);
ruleVO
List
.
add
((
BaseRuleVO
)
ruleVO
);
}
return
baseRuleList
;
}
private
static
List
<
String
>
createValue
(
String
operator
,
String
value
){
...
...
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