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
08b68303
Commit
08b68303
authored
Sep 17, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉重复值
parent
3fa567f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
+12
-1
DataExplainController.java
...cloud/operation/web/controller/DataExplainController.java
+12
-1
No files found.
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/DataExplainController.java
View file @
08b68303
package
com
.
gic
.
cloud
.
operation
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.authcenter.security.core.util.UserUtils
;
...
...
@@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
...
...
@@ -104,7 +106,16 @@ public class DataExplainController {
public
RestResponse
moduleList
()
{
Object
cache
=
RedisUtil
.
getCache
(
"enterprise:datacloud:moduleList"
);
if
(
cache
!=
null
)
{
return
RestResponse
.
success
(
JSON
.
parseArray
(
cache
.
toString
()));
List
<
JSONObject
>
resultList
=
JSON
.
parseArray
(
cache
.
toString
(),
JSONObject
.
class
);
Page
<
DataExplainDTO
>
page
=
dataExplainApiService
.
listDataExplain
(
new
DataExplainQo
()).
getResult
();
if
(
page
!=
null
)
{
List
<
DataExplainDTO
>
result
=
page
.
getResult
();
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
());
}
return
RestResponse
.
success
(
resultList
);
}
return
RestResponse
.
success
();
}
...
...
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