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
1872eb0c
Commit
1872eb0c
authored
Jul 17, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分组名
parent
2e621477
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
6 deletions
+28
-6
TabIndexGroupMapper.java
...in/java/com/gic/cloud/dao/mapper/TabIndexGroupMapper.java
+3
-1
IndexGroupService.java
...rc/main/java/com/gic/cloud/service/IndexGroupService.java
+2
-0
IndexGroupServiceImpl.java
...ava/com/gic/cloud/service/impl/IndexGroupServiceImpl.java
+11
-1
IndexApiServiceImpl.java
...com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
+5
-4
TabIndexGroupMapper.xml
...service/src/main/resources/mapper/TabIndexGroupMapper.xml
+7
-0
No files found.
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabIndexGroupMapper.java
View file @
1872eb0c
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabIndexGroup
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -55,5 +56,5 @@ public interface TabIndexGroupMapper {
TabIndexGroup
getBySelective
(
TabIndexGroup
indexGroup
);
List
<
TabIndexGroup
>
listIndexGroup
();
List
<
TabIndexGroup
>
listIndexGroup
(
@Param
(
"ids"
)
List
<
Integer
>
indexGroupIdList
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/service/IndexGroupService.java
View file @
1872eb0c
...
...
@@ -22,4 +22,6 @@ public interface IndexGroupService {
void
delete
(
Integer
indexGroupId
);
List
<
TabIndexGroup
>
listIndexGroup
();
String
getNameByIds
(
List
<
Integer
>
indexGroupIdList
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexGroupServiceImpl.java
View file @
1872eb0c
...
...
@@ -8,8 +8,11 @@ import com.gic.commons.util.EntityUtil;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* @author zhiwj
...
...
@@ -59,6 +62,13 @@ public class IndexGroupServiceImpl implements IndexGroupService {
@Override
public
List
<
TabIndexGroup
>
listIndexGroup
()
{
return
tabIndexGroupMapper
.
listIndexGroup
();
return
tabIndexGroupMapper
.
listIndexGroup
(
null
);
}
@Override
public
String
getNameByIds
(
List
<
Integer
>
indexGroupIdList
)
{
List
<
TabIndexGroup
>
indexGroupList
=
tabIndexGroupMapper
.
listIndexGroup
(
indexGroupIdList
);
return
Optional
.
ofNullable
(
indexGroupList
).
orElse
(
Collections
.
emptyList
())
.
stream
().
map
(
TabIndexGroup:
:
getIndexGroupName
).
collect
(
Collectors
.
joining
(
"\\"
));
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
View file @
1872eb0c
...
...
@@ -22,6 +22,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @author zhiwj
...
...
@@ -125,10 +126,10 @@ public class IndexApiServiceImpl implements IndexApiService {
return
indexGroupName
;
}
TabIndexGroup
indexGroup
=
indexGroupService
.
getById
(
indexGroupId
);
// List<Integer> indexGroupId
= Stream.of(indexGroup.getGroupChain().split("_")).map(Integer::valueOf).collect(Collectors.toList());
return
null
;
List
<
Integer
>
indexGroupIdList
=
Stream
.
of
(
indexGroup
.
getGroupChain
().
split
(
"_"
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
String
groupName
=
indexGroupService
.
getNameByIds
(
indexGroupIdList
);
cache
.
put
(
indexGroupId
,
groupName
);
return
groupName
;
}
@Override
...
...
gic-data-cloud-service/src/main/resources/mapper/TabIndexGroupMapper.xml
View file @
1872eb0c
...
...
@@ -135,5 +135,11 @@
select
<include
refid=
"Base_Column_List"
/>
from tab_index_group where status = 1
<if
test=
"null != ids and ids.size > 0"
>
and index_group_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
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