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
75d9b1ac
Commit
75d9b1ac
authored
Jul 16, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
ca8a5cb3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletions
+33
-1
IndexDTO.java
...a-cloud-api/src/main/java/com/gic/cloud/dto/IndexDTO.java
+9
-0
TabIndexModuleRelMapper.java
...ava/com/gic/cloud/dao/mapper/TabIndexModuleRelMapper.java
+2
-1
IndexApiServiceImpl.java
...com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
+22
-0
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/dto/IndexDTO.java
View file @
75d9b1ac
...
@@ -141,6 +141,7 @@ public class IndexDTO implements Serializable {
...
@@ -141,6 +141,7 @@ public class IndexDTO implements Serializable {
private
String
optUserName
;
private
String
optUserName
;
private
Integer
indexGroupId
;
private
Integer
indexGroupId
;
private
String
indexGroupName
;
public
Integer
getIndexId
()
{
public
Integer
getIndexId
()
{
return
indexId
;
return
indexId
;
...
@@ -365,4 +366,12 @@ public class IndexDTO implements Serializable {
...
@@ -365,4 +366,12 @@ public class IndexDTO implements Serializable {
public
void
setIndexGroupId
(
Integer
indexGroupId
)
{
public
void
setIndexGroupId
(
Integer
indexGroupId
)
{
this
.
indexGroupId
=
indexGroupId
;
this
.
indexGroupId
=
indexGroupId
;
}
}
public
String
getIndexGroupName
()
{
return
indexGroupName
;
}
public
void
setIndexGroupName
(
String
indexGroupName
)
{
this
.
indexGroupName
=
indexGroupName
;
}
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabIndexModuleRelMapper.java
View file @
75d9b1ac
...
@@ -64,7 +64,7 @@ public interface TabIndexModuleRelMapper {
...
@@ -64,7 +64,7 @@ public interface TabIndexModuleRelMapper {
List
<
Integer
>
listBusinessIdByModuleId
(
@Param
(
"moduleId"
)
String
moduleId
);
List
<
Integer
>
listBusinessIdByModuleId
(
@Param
(
"moduleId"
)
String
moduleId
);
List
<
Integer
>
listBusinessIdByModuleIds
(
@Param
(
"
moduleIdList
"
)
List
<
String
>
moduleIdList
);
List
<
Integer
>
listBusinessIdByModuleIds
(
@Param
(
"
ids
"
)
List
<
String
>
moduleIdList
);
List
<
TabIndexModuleRel
>
listModuleIdByBusinessIds
(
@Param
(
"ids"
)
List
<
Integer
>
businessIdList
,
@Param
(
"type"
)
Integer
type
);
List
<
TabIndexModuleRel
>
listModuleIdByBusinessIds
(
@Param
(
"ids"
)
List
<
Integer
>
businessIdList
,
@Param
(
"type"
)
Integer
type
);
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
View file @
75d9b1ac
...
@@ -6,6 +6,7 @@ import com.gic.cloud.constants.LogAndUpdateTipsTypeEnum;
...
@@ -6,6 +6,7 @@ import com.gic.cloud.constants.LogAndUpdateTipsTypeEnum;
import
com.gic.cloud.constants.UpdateTypeEnum
;
import
com.gic.cloud.constants.UpdateTypeEnum
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.entity.TabIndexGroup
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.service.*
;
import
com.gic.cloud.service.*
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
...
@@ -13,9 +14,11 @@ import com.gic.commons.util.PageHelperUtils;
...
@@ -13,9 +14,11 @@ import com.gic.commons.util.PageHelperUtils;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -36,6 +39,8 @@ public class IndexApiServiceImpl implements IndexApiService {
...
@@ -36,6 +39,8 @@ public class IndexApiServiceImpl implements IndexApiService {
private
IndexModuleRelService
indexModuleRelService
;
private
IndexModuleRelService
indexModuleRelService
;
@Autowired
@Autowired
private
UpdateTipService
updateTipService
;
private
UpdateTipService
updateTipService
;
@Autowired
private
IndexGroupService
indexGroupService
;
@Override
@Override
public
ServiceResponse
<
Void
>
saveIndex
(
IndexDTO
indexDTO
)
{
public
ServiceResponse
<
Void
>
saveIndex
(
IndexDTO
indexDTO
)
{
...
@@ -102,13 +107,30 @@ public class IndexApiServiceImpl implements IndexApiService {
...
@@ -102,13 +107,30 @@ public class IndexApiServiceImpl implements IndexApiService {
List
<
Integer
>
indexIdList
=
indexList
.
stream
().
map
(
TabIndex:
:
getIndexId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
indexIdList
=
indexList
.
stream
().
map
(
TabIndex:
:
getIndexId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
List
<
String
>>
moduleIdByBusinessIdMap
=
indexModuleRelService
.
groupModuleIdByBusinessIds
(
indexIdList
,
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
());
Map
<
Integer
,
List
<
String
>>
moduleIdByBusinessIdMap
=
indexModuleRelService
.
groupModuleIdByBusinessIds
(
indexIdList
,
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
());
List
<
IndexDTO
>
indexDTOList
=
indexDTOPage
.
getResult
();
List
<
IndexDTO
>
indexDTOList
=
indexDTOPage
.
getResult
();
HashMap
<
Integer
,
String
>
cache
=
new
HashMap
<>();
for
(
IndexDTO
indexDTO
:
indexDTOList
)
{
for
(
IndexDTO
indexDTO
:
indexDTOList
)
{
indexDTO
.
setRelModuleIdList
(
moduleIdByBusinessIdMap
.
get
(
indexDTO
.
getIndexId
()));
indexDTO
.
setRelModuleIdList
(
moduleIdByBusinessIdMap
.
get
(
indexDTO
.
getIndexId
()));
Integer
indexGroupId
=
indexDTO
.
getIndexGroupId
();
if
(
indexGroupId
!=
null
)
{
indexDTO
.
setIndexGroupName
(
getIndexGroupName
(
cache
,
indexGroupId
));
}
}
}
}
}
return
EnterpriseServiceResponse
.
success
(
indexDTOPage
);
return
EnterpriseServiceResponse
.
success
(
indexDTOPage
);
}
}
private
String
getIndexGroupName
(
HashMap
<
Integer
,
String
>
cache
,
Integer
indexGroupId
)
{
String
indexGroupName
=
cache
.
get
(
indexGroupId
);
if
(
StringUtils
.
isNotBlank
(
indexGroupName
))
{
return
indexGroupName
;
}
TabIndexGroup
indexGroup
=
indexGroupService
.
getById
(
indexGroupId
);
// List<Integer> indexGroupId = Stream.of(indexGroup.getGroupChain().split("_")).map(Integer::valueOf).collect(Collectors.toList());
return
null
;
}
@Override
@Override
public
ServiceResponse
<
List
<
IndexDTO
>>
listAllIndex
()
{
public
ServiceResponse
<
List
<
IndexDTO
>>
listAllIndex
()
{
List
<
TabIndex
>
tabIndices
=
indexService
.
listAllIndex
(
new
IndexQO
());
List
<
TabIndex
>
tabIndices
=
indexService
.
listAllIndex
(
new
IndexQO
());
...
...
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