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
bf14ebe6
Commit
bf14ebe6
authored
Aug 17, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标修改
parent
65338ca5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
9 deletions
+28
-9
IndexDescApiService.java
.../main/java/com/gic/cloud/service/IndexDescApiService.java
+1
-1
DataExplainController.java
...cloud/operation/web/controller/DataExplainController.java
+12
-0
IndexController.java
...m/gic/cloud/operation/web/controller/IndexController.java
+2
-2
IndexDescApiServiceImpl.java
...gic/cloud/service/outer/impl/IndexDescApiServiceImpl.java
+13
-6
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/service/IndexDescApiService.java
View file @
bf14ebe6
...
...
@@ -123,5 +123,5 @@ public interface IndexDescApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.IndexDescDTO>>
* @throws
*/
ServiceResponse
<
List
<
IndexDescDTO
>>
listAllUnRel
();
ServiceResponse
<
List
<
IndexDescDTO
>>
listAllUnRel
(
String
moduleIds
);
}
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/DataExplainController.java
View file @
bf14ebe6
package
com
.
gic
.
cloud
.
operation
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.authcenter.security.core.util.UserUtils
;
...
...
@@ -11,6 +12,7 @@ import com.gic.cloud.service.IndexLogApiService;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -96,4 +98,13 @@ public class DataExplainController {
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
@RequestMapping
(
"/data-module-list"
)
public
RestResponse
moduleList
()
{
Object
cache
=
RedisUtil
.
getCache
(
"enterprise:datacloud:moduleList"
);
if
(
cache
!=
null
)
{
return
RestResponse
.
success
(
JSON
.
parseArray
(
cache
.
toString
()));
}
return
RestResponse
.
success
();
}
}
\ No newline at end of file
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/IndexController.java
View file @
bf14ebe6
...
...
@@ -132,8 +132,8 @@ public class IndexController {
}
@RequestMapping
(
"/module-list"
)
public
RestResponse
moduleList
()
{
ServiceResponse
<
List
<
IndexDescDTO
>>
serviceResponse
=
indexDescApiService
.
listAllUnRel
();
public
RestResponse
moduleList
(
String
moduleIds
)
{
ServiceResponse
<
List
<
IndexDescDTO
>>
serviceResponse
=
indexDescApiService
.
listAllUnRel
(
moduleIds
);
List
<
IndexDescDTO
>
list
=
serviceResponse
.
getResult
();
List
<
ModuleVO
>
moduleVOList
=
new
ArrayList
<>();
for
(
IndexDescDTO
indexDescDTO
:
list
)
{
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/IndexDescApiServiceImpl.java
View file @
bf14ebe6
...
...
@@ -10,14 +10,13 @@ import com.gic.cloud.service.*;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @author zhiwj
...
...
@@ -103,9 +102,17 @@ public class IndexDescApiServiceImpl implements IndexDescApiService {
}
@Override
public
ServiceResponse
<
List
<
IndexDescDTO
>>
listAllUnRel
()
{
public
ServiceResponse
<
List
<
IndexDescDTO
>>
listAllUnRel
(
String
moduleIds
)
{
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
relModuleIdList
=
indexModuleRelService
.
listRelModuleId
(
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
());
List
<
Integer
>
indexDescIdList
=
Optional
.
ofNullable
(
relModuleIdList
).
orElse
(
Collections
.
emptyList
())
if
(
CollectionUtils
.
isNotEmpty
(
relModuleIdList
))
{
list
.
addAll
(
relModuleIdList
);
}
if
(
StringUtils
.
isNotBlank
(
moduleIds
))
{
List
<
String
>
relModuleIdList2
=
Stream
.
of
(
moduleIds
.
split
(
","
)).
collect
(
Collectors
.
toList
());
list
.
addAll
(
relModuleIdList2
);
}
List
<
Integer
>
indexDescIdList
=
Optional
.
of
(
list
).
orElse
(
Collections
.
emptyList
())
.
stream
().
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
TabIndexDesc
>
indexDescList
=
this
.
indexDescService
.
listAllUnRel
(
indexDescIdList
);
List
<
IndexDescDTO
>
indexDescDTOList
=
EntityUtil
.
changeEntityListByJSON
(
IndexDescDTO
.
class
,
indexDescList
);
...
...
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