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
03999886
Commit
03999886
authored
Mar 06, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改标签删除接口,联动删除该标签打在所有元数据中
parent
5efbf800
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
RepoServiceClient.java
...va/com/keymobile/tagmanager/remote/RepoServiceClient.java
+6
-0
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+7
-1
No files found.
src/main/java/com/keymobile/tagmanager/remote/RepoServiceClient.java
View file @
03999886
...
...
@@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.keymobile.tagmanager.exception.TagException
;
@FeignClient
(
name
=
"MetadataRepo"
)
public
interface
RepoServiceClient
{
@PostMapping
(
value
=
"/rest/tag/getByTag"
)
...
...
@@ -56,4 +58,8 @@ public interface RepoServiceClient {
@GetMapping
(
value
=
"/rest/tag/aggregate"
)
public
List
<
Map
<
String
,
Object
>>
aggregate
(
@RequestParam
(
required
=
false
)
String
modelPath
,
@RequestParam
String
attributeName
);
@PostMapping
(
value
=
"rest/tag/deleteTag"
)
public
int
deleteTag
(
@RequestParam
String
idPath
,
@RequestParam
String
tagType
,
@RequestParam
String
dimensionType
)
throws
TagException
;
}
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
03999886
...
...
@@ -103,7 +103,13 @@ public class TagService {
if
(!
childs
.
isEmpty
())
{
throw
new
TagException
(
"存在子节点,不允许删除!"
);
}
tagRepository
.
deleteById
(
tagId
);
//删除元数据中打了这个标签的
int
result
=
repoService
.
deleteTag
(
parentTag
.
getIdPath
(),
parentTag
.
getTagType
(),
parentTag
.
getDimensionType
());
//如果删除成功
if
(
result
>=
0
)
{
tagRepository
.
deleteById
(
tagId
);
}
}
}
...
...
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