Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
b1c9889c
Commit
b1c9889c
authored
Mar 06, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商户规则修改
parent
3f2e545d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
ConfigRuleApiServiceImpl.java
...terprise/service/outer/impl/ConfigRuleApiServiceImpl.java
+28
-3
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/ConfigRuleApiServiceImpl.java
View file @
b1c9889c
...
...
@@ -334,7 +334,7 @@ public class ConfigRuleApiServiceImpl implements ConfigRuleApiService {
Map
<
String
,
List
<
RuleClassifySceneListDTO
>>
ruleClassifyMap
=
new
HashMap
<>(
16
);
for
(
TabConfigRule
rule
:
list
)
{
Boolean
select
=
false
;
if
(
ruleRelMap
.
contains
(
rule
.
getRuleId
()))
{
if
(
ruleRelMap
.
contains
(
rule
.
getRuleId
()
.
toString
()
))
{
select
=
true
;
}
//必有值,如果为空,则说明数据错误,需要修正
...
...
@@ -412,7 +412,19 @@ public class ConfigRuleApiServiceImpl implements ConfigRuleApiService {
if
(
CollectionUtils
.
isNotEmpty
(
ruleList
))
{
for
(
RuleListDTO
ruleListDTO
:
ruleList
)
{
if
(
ruleListDTO
.
getAppCode
().
equals
(
appCode
))
{
return
ServiceResponse
.
success
(
ruleListDTO
.
getRuleClassifyList
());
//勾选中的列表
List
<
RuleClassifyListDTO
>
temp
=
ruleListDTO
.
getRuleClassifyList
();
List
<
RuleClassifyListDTO
>
select
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
temp
))
{
for
(
RuleClassifyListDTO
dto
:
temp
)
{
if
(
dto
.
getSelect
())
{
//场景重置
dto
.
setRuleClassifySceneList
(
null
);
select
.
add
(
dto
);
}
}
}
return
ServiceResponse
.
success
(
select
);
}
}
}
...
...
@@ -453,7 +465,20 @@ public class ConfigRuleApiServiceImpl implements ConfigRuleApiService {
if
(
CollectionUtils
.
isNotEmpty
(
classifyList
))
{
for
(
RuleClassifyListDTO
classifyListDTO
:
classifyList
)
{
if
(
classifyListDTO
.
getRuleId
().
intValue
()
==
ruleClassifyId
.
intValue
())
{
return
ServiceResponse
.
success
(
classifyListDTO
.
getRuleClassifySceneList
());
if
(!
classifyListDTO
.
getSelect
())
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"分类ID错误,商户规则未配置该分类"
);
}
//勾选中的,即配置可用的
List
<
RuleClassifySceneListDTO
>
temp
=
classifyListDTO
.
getRuleClassifySceneList
();
List
<
RuleClassifySceneListDTO
>
select
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
temp
))
{
for
(
RuleClassifySceneListDTO
dto
:
temp
)
{
if
(
dto
.
getSelect
())
{
select
.
add
(
dto
);
}
}
}
return
ServiceResponse
.
success
(
select
);
}
}
}
...
...
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