Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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-data-cloud
Commits
c4c319d6
Commit
c4c319d6
authored
Sep 17, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉重复值
parent
08b68303
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
DataExplainController.java
...cloud/operation/web/controller/DataExplainController.java
+2
-2
No files found.
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/DataExplainController.java
View file @
c4c319d6
...
@@ -103,7 +103,7 @@ public class DataExplainController {
...
@@ -103,7 +103,7 @@ public class DataExplainController {
}
}
@RequestMapping
(
"/data-module-list"
)
@RequestMapping
(
"/data-module-list"
)
public
RestResponse
moduleList
()
{
public
RestResponse
moduleList
(
String
moduleId
)
{
Object
cache
=
RedisUtil
.
getCache
(
"enterprise:datacloud:moduleList"
);
Object
cache
=
RedisUtil
.
getCache
(
"enterprise:datacloud:moduleList"
);
if
(
cache
!=
null
)
{
if
(
cache
!=
null
)
{
List
<
JSONObject
>
resultList
=
JSON
.
parseArray
(
cache
.
toString
(),
JSONObject
.
class
);
List
<
JSONObject
>
resultList
=
JSON
.
parseArray
(
cache
.
toString
(),
JSONObject
.
class
);
...
@@ -112,7 +112,7 @@ public class DataExplainController {
...
@@ -112,7 +112,7 @@ public class DataExplainController {
List
<
DataExplainDTO
>
result
=
page
.
getResult
();
List
<
DataExplainDTO
>
result
=
page
.
getResult
();
Set
<
String
>
usedList
=
result
.
stream
().
filter
(
e
->
StringUtils
.
isNotBlank
(
e
.
getModuleId
())).
map
(
DataExplainDTO:
:
getModuleId
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
usedList
=
result
.
stream
().
filter
(
e
->
StringUtils
.
isNotBlank
(
e
.
getModuleId
())).
map
(
DataExplainDTO:
:
getModuleId
).
collect
(
Collectors
.
toSet
());
resultList
=
resultList
.
stream
().
filter
(
e
->
!
usedList
.
contains
(
e
.
getString
(
"moduleId"
))).
collect
(
Collectors
.
toList
());
resultList
=
resultList
.
stream
().
filter
(
e
->
!
usedList
.
contains
(
e
.
getString
(
"moduleId"
))
||
StringUtils
.
equals
(
e
.
getString
(
"moduleId"
),
moduleId
)
).
collect
(
Collectors
.
toList
());
}
}
return
RestResponse
.
success
(
resultList
);
return
RestResponse
.
success
(
resultList
);
...
...
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