Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
904c8e4d
Commit
904c8e4d
authored
Jun 22, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业微信同步
parent
28f2a520
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
QywxTagApiServiceImpl.java
...anage/service/service/out/impl/QywxTagApiServiceImpl.java
+5
-3
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QywxTagApiServiceImpl.java
View file @
904c8e4d
...
...
@@ -28,6 +28,7 @@ import org.springframework.util.CollectionUtils;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
...
...
@@ -107,7 +108,8 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
* @param enterpriseId
* @param infoDTO
*/
private
void
saveRelation
(
String
wxEnterpriseId
,
String
enterpriseId
,
QywxTagInfoDTO
infoDTO
)
{
private
void
saveRelation
(
String
wxEnterpriseId
,
String
enterpriseId
,
QywxTagInfoDTO
infoDTO
,
List
<
QywxTagItemDTO
>
items
)
{
Map
<
String
,
QywxTagItemDTO
>
orgMap
=
items
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getQywxTagName
(),
dto
->
dto
));
//设置关联关系
TabQywxTag
groupKey
=
qywxTagService
.
getQywxTagByQywxGroupKey
(
wxEnterpriseId
,
infoDTO
.
getQywxGroupKey
());
List
<
TabQywxTagItem
>
tabQywxTagItems
=
qywxTagService
.
listByQywxTagId
(
wxEnterpriseId
,
groupKey
.
getQywxTagId
());
...
...
@@ -124,6 +126,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
groupRelation
.
setWxEnterpriseId
(
wxEnterpriseId
);
saveRelationList
.
add
(
groupRelation
);
List
<
TabQywxTagRelation
>
itemList
=
tabQywxTagItems
.
stream
().
map
(
tab
->
{
QywxTagItemDTO
orgItem
=
orgMap
.
get
(
tab
.
getQywxTagName
());
TabQywxTagRelation
itemRelation
=
new
TabQywxTagRelation
();
itemRelation
.
setWxEnterpriseId
(
wxEnterpriseId
);
itemRelation
.
setQywxTagRelationId
(
ToolUtil
.
randomUUID
());
...
...
@@ -134,7 +137,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
itemRelation
.
setMemberTagId
(
groupKey
.
getQywxGroupKey
());
itemRelation
.
setEnterpriseId
(
enterpriseId
);
itemRelation
.
setQywxTagItemId
(
tab
.
getQywxTagItemId
());
itemRelation
.
setTagItemId
(
tab
.
getQywxTagKey
());
itemRelation
.
setTagItemId
(
orgItem
.
getQywxTagKey
());
return
itemRelation
;
}).
collect
(
Collectors
.
toList
());
saveRelationList
.
addAll
(
itemList
);
...
...
@@ -157,7 +160,6 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
List
<
QywxTagDTO
>
tagItems
=
items
.
stream
().
map
(
item
->
{
QywxTagDTO
qywxTagDTO
=
new
QywxTagDTO
();
qywxTagDTO
.
setId
(
item
.
getQywxTagKey
());
qywxTagDTO
.
setName
(
item
.
getQywxTagName
());
qywxTagDTO
.
setOrder
(
item
.
getOrder
());
return
qywxTagDTO
;
...
...
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