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
1443fe25
Commit
1443fe25
authored
Mar 02, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改标签共享接口
parent
f883a38d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+11
-8
No files found.
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
1443fe25
...
@@ -23,7 +23,6 @@ import org.springframework.data.mongodb.core.MongoOperations;
...
@@ -23,7 +23,6 @@ import org.springframework.data.mongodb.core.MongoOperations;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.keymobile.auth.common.security.GrantedAuthHelper
;
import
com.keymobile.auth.common.security.GrantedAuthHelper
;
import
com.keymobile.tagmanager.exception.TagDuplicateException
;
import
com.keymobile.tagmanager.exception.TagDuplicateException
;
...
@@ -831,9 +830,9 @@ public class TagService {
...
@@ -831,9 +830,9 @@ public class TagService {
logger
.
info
(
"tag share systemTagMap:"
+
systemTagMap
);
logger
.
info
(
"tag share systemTagMap:"
+
systemTagMap
);
if
(!
systemTagMap
.
isEmpty
())
{
if
(!
systemTagMap
.
isEmpty
())
{
//获取传入的标签关联的元数据
//获取传入的标签关联的元数据
Map
<
String
,
Object
>
data
=
repoService
.
getTagMetadata
(
tag
.
getDimensionType
(),
List
<
Map
<
String
,
Object
>>
content
=
repoService
.
getByTagByPrivileges
(
systemTagMap
,
tag
.
getIdPath
(),
""
,
null
,
1
,
100000
,
tag
.
getTagType
());
null
,
tag
.
getIdPath
(),
tag
.
getTagType
(),
tag
.
getDimensionType
(),
""
,
List
<
Map
<
String
,
Object
>>
content
=
(
List
<
Map
<
String
,
Object
>>)
data
.
get
(
"content"
);
1
,
10
);
if
(!
content
.
isEmpty
())
{
if
(!
content
.
isEmpty
())
{
//比较标签关联的元数据所属系统跟用户被授予的系统是否一致
//比较标签关联的元数据所属系统跟用户被授予的系统是否一致
for
(
Map
<
String
,
Object
>
mData
:
content
)
{
for
(
Map
<
String
,
Object
>
mData
:
content
)
{
...
@@ -848,10 +847,14 @@ public class TagService {
...
@@ -848,10 +847,14 @@ public class TagService {
//根据当前用户被授予的标签获取关联的元数据
//根据当前用户被授予的标签获取关联的元数据
Set
<
String
>
tags
=
systemTagMap
.
get
(
Long
.
valueOf
(
sys
));
Set
<
String
>
tags
=
systemTagMap
.
get
(
Long
.
valueOf
(
sys
));
for
(
String
usrTag
:
tags
)
{
for
(
String
usrTag
:
tags
)
{
Map
<
String
,
Object
>
tagData
=
repoService
.
getTagMetadata
(
"1"
,
List
<
Map
<
String
,
Object
>>
tagContent
=
repoService
.
usrTag
,
""
,
null
,
1
,
100000
,
"1"
);
getByTagByPrivileges
(
systemTagMap
,
null
,
List
<
Map
<
String
,
Object
>>
tagContent
=
(
List
<
Map
<
String
,
Object
>>)
tagData
.
get
(
"content"
);
usrTag
,
"1"
,
"1"
,
""
,
1
,
10
);
if
(
tagContent
.
contains
(
mData
))
{
List
<
String
>
idList
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
tagContent
)
{
idList
.
add
(
map
.
get
(
"_id"
).
toString
());
}
if
(
idList
.
contains
(
mData
.
get
(
"_id"
)))
{
return
true
;
return
true
;
}
}
}
}
...
...
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