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
7ff06ca5
Commit
7ff06ca5
authored
Sep 15, 2021
by
xugaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9月迭代:企业微信列表支持标签是否同步查询
parent
2fcf25e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
EnterpriseController.java
...ic/haoban/manage/web/controller/EnterpriseController.java
+19
-4
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/EnterpriseController.java
View file @
7ff06ca5
...
...
@@ -56,8 +56,9 @@ public class EnterpriseController extends WebBaseController {
// @Autowired
// private WxEnterpriseRelatedApiService wxEnterpriseRelllatedApiService;
//企业列表
// openTagFlag 0 未开启 1 开启 2 所有
@RequestMapping
(
"wx-enterprise-list"
)
public
HaobanResponse
wxEnterpriseList
(
BasePageInfo
pageInfo
,
String
keyword
,
String
gicEnterpriseName
,
Integer
gicContactHelper
,
String
version
)
{
public
HaobanResponse
wxEnterpriseList
(
BasePageInfo
pageInfo
,
String
keyword
,
int
openTagFlag
,
String
gicEnterpriseName
,
Integer
gicContactHelper
,
String
version
)
{
List
<
String
>
wxEnterpriseIds
=
new
ArrayList
<
String
>();
if
(!
StringUtils
.
isEmpty
(
gicEnterpriseName
))
{
List
<
EnterpriseDTO
>
enterpriseNames
=
enterpriseService
.
getEnterpriseByName
(
gicEnterpriseName
);
...
...
@@ -84,14 +85,28 @@ public class EnterpriseController extends WebBaseController {
Page
<
YwWxEnterpriseDTO
>
page
=
wxEnterpriseApiService
.
list
(
pageInfo
,
keyword
,
wxEnterpriseIds
,
gicContactHelper
,
version
);
PageResult
<
YwWxEnterpriseDTO
>
pageVo
=
new
PageResult
<>();
List
<
YwWxEnterpriseDTO
>
list
=
EntityUtil
.
changeEntityListByJSON
(
YwWxEnterpriseDTO
.
class
,
page
.
getResult
());
for
(
YwWxEnterpriseDTO
dto
:
list
)
{
Set
<
String
>
finalWxEntIdSet
=
wxEntIdSet
;
list
.
stream
().
filter
(
one
->
{
if
(
openTagFlag
==
0
)
{
return
!
finalWxEntIdSet
.
contains
(
one
.
getWxEnterpriseId
());
}
if
(
openTagFlag
==
1
)
{
return
finalWxEntIdSet
.
contains
(
one
.
getWxEnterpriseId
());
}
if
(
openTagFlag
==
2
)
{
return
true
;
}
return
true
;
}).
forEach
(
dto
->
{
dto
.
setVersion
(
"3.0"
);
dto
.
setBuyDate
(
new
Date
());
dto
.
setBuyStatus
(
"1"
);
List
<
EnterpriseDetailDTO
>
counts
=
wxEnterpriseRelatedApiService
.
listEnterpriseByWxEnterpriseId
(
dto
.
getWxEnterpriseId
());
dto
.
setRelationCount
(
counts
.
size
());
dto
.
setTagOpenFlag
(
wxEntIdSet
.
contains
(
dto
.
getWxEnterpriseId
())
?
1
:
0
);
}
dto
.
setTagOpenFlag
(
finalWxEntIdSet
.
contains
(
dto
.
getWxEnterpriseId
())
?
1
:
0
);
});
pageVo
.
setList
(
list
);
pageVo
.
setPageNum
(
page
.
getCurrentPage
());
pageVo
.
setPages
(
page
.
getPages
());
...
...
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