Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tagManager
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
lanmw
tagManager
Commits
c306c418
Commit
c306c418
authored
Mar 10, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签元数据添加标签模糊搜索条件
parent
03999886
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
TagRepository.java
...a/com/keymobile/tagmanager/persistence/TagRepository.java
+3
-0
RepoServiceClient.java
...va/com/keymobile/tagmanager/remote/RepoServiceClient.java
+1
-0
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+10
-1
No files found.
src/main/java/com/keymobile/tagmanager/persistence/TagRepository.java
View file @
c306c418
package
com
.
keymobile
.
tagmanager
.
persistence
;
import
java.util.List
;
import
java.util.Optional
;
import
org.springframework.data.mongodb.repository.MongoRepository
;
...
...
@@ -9,4 +10,6 @@ import com.keymobile.tagmanager.model.Tag;
public
interface
TagRepository
extends
MongoRepository
<
Tag
,
String
>
{
public
Optional
<
Tag
>
findByIdPath
(
String
idPath
);
public
List
<
Tag
>
findByIdPathLikeAndNameLike
(
String
idPath
,
String
tagName
);
}
src/main/java/com/keymobile/tagmanager/remote/RepoServiceClient.java
View file @
c306c418
...
...
@@ -31,6 +31,7 @@ public interface RepoServiceClient {
@RequestParam
String
tagType
,
@RequestParam
String
dimensionType
,
@RequestParam
(
required
=
false
)
String
keyword
,
@RequestParam
(
required
=
false
)
List
<
String
>
tagIds
,
@RequestParam
(
required
=
false
)
String
startDate
,
@RequestParam
(
required
=
false
)
String
endDate
,
@RequestParam
int
pageNum
,
...
...
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
c306c418
...
...
@@ -728,9 +728,18 @@ public class TagService {
//获取用户关联的数据权限
Map
<
Long
,
Set
<
String
>>
systemTagMap
=
GrantedAuthHelper
.
getDataPrivileges
();
logger
.
info
(
"tag metadata user privilege:"
+
systemTagMap
);
//author:zhangkb time:2020-3-10 desc:根据keyword模糊匹配标签内容
List
<
Tag
>
likeTagList
=
tagRepository
.
findByIdPathLikeAndNameLike
(
idPath
,
keyword
);
List
<
String
>
tagIdList
=
new
ArrayList
<>();
if
(!
likeTagList
.
isEmpty
())
{
for
(
Tag
tag
:
likeTagList
)
{
tagIdList
.
add
(
tag
.
getId
());
}
}
//调用repo接口获取标签关联的元数据
Map
<
String
,
Object
>
tagData
=
repoService
.
getPageByTag
(
systemTagMap
,
modelPath
,
idPath
,
tagType
,
dimensionType
,
keyword
,
startDate
,
endDate
,
pageNum
,
pageSize
);
tagType
,
dimensionType
,
keyword
,
tagIdList
,
startDate
,
endDate
,
pageNum
,
pageSize
);
tagData
.
put
(
"systemTagMap"
,
systemTagMap
);
List
<
Map
<
String
,
Object
>>
content
=
(
List
<
Map
<
String
,
Object
>>)
tagData
.
get
(
"content"
);
//判断不是个人标签
...
...
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