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
9cbfe82a
Commit
9cbfe82a
authored
Apr 15, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据标签id列表获取标签list接口
parent
b886ee19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
TagCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
+4
-4
TagRepository.java
...a/com/keymobile/tagmanager/persistence/TagRepository.java
+2
-0
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+4
-0
No files found.
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
View file @
9cbfe82a
...
...
@@ -84,10 +84,10 @@ public class TagCtrl {
return
tagService
.
hasChild
(
tagId
,
userName
);
}
@ApiOperation
(
value
=
"根据
标签id获取标签信息"
,
notes
=
"根据标签id获取标签信息
"
)
@PostMapping
(
value
=
"/getTag
ById
"
)
public
Tag
getTagById
(
@RequestParam
(
value
=
"tagId"
)
String
tagId
)
throws
Exception
{
return
tagService
.
getTag
ById
(
tagId
);
@ApiOperation
(
value
=
"根据
多个标签id获取标签信息列表"
,
notes
=
"根据标签id获取标签信息列表
"
)
@PostMapping
(
value
=
"/getTag
ListByIds
"
)
public
List
<
Tag
>
getTagListByIds
(
@RequestBody
List
<
String
>
tagIds
)
throws
Exception
{
return
tagService
.
getTag
ListByIds
(
tagIds
);
}
@ApiOperation
(
value
=
"获取维度标签树"
,
notes
=
"获取维度标签树"
)
...
...
src/main/java/com/keymobile/tagmanager/persistence/TagRepository.java
View file @
9cbfe82a
...
...
@@ -12,4 +12,6 @@ public interface TagRepository extends MongoRepository<Tag, String> {
public
Optional
<
Tag
>
findByIdPath
(
String
idPath
);
public
List
<
Tag
>
findByIdPathLikeAndNameLike
(
String
idPath
,
String
tagName
);
public
List
<
Tag
>
findByIdIn
(
List
<
String
>
ids
);
}
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
9cbfe82a
...
...
@@ -124,6 +124,10 @@ public class TagService {
return
false
;
}
public
List
<
Tag
>
getTagListByIds
(
List
<
String
>
ids
)
throws
TagNotExistException
{
return
tagRepository
.
findByIdIn
(
ids
);
}
//根据标签id获取标签
public
Tag
getTagById
(
String
tagId
)
throws
TagNotExistException
{
Tag
t
=
mongoOperations
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"_id"
).
is
(
tagId
)),
Tag
.
class
);
...
...
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