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
1f39ed25
Commit
1f39ed25
authored
Jun 19, 2025
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群加gic企业id参数
parent
6ab222ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
3 deletions
+47
-3
OwnerSearchQDTO.java
.../gic/haoban/manage/api/dto/qdto/chat/OwnerSearchQDTO.java
+11
-2
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+34
-0
GroupChatController.java
...aoban/manage/web/controller/chat/GroupChatController.java
+2
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/chat/OwnerSearchQDTO.java
View file @
1f39ed25
...
...
@@ -27,12 +27,21 @@ public class OwnerSearchQDTO implements Serializable {
// 1查询在职 2查离职
private
int
status
=
1
;
// 选择的企业id
// 选择的企业id
(过滤条件)
private
String
paramsEnterpriseId
;
// 显示门店名称的企业
private
String
showNameEnterpriseId
;
// 是否需要显示门店名称
private
int
showStoreNames
;
public
String
getShowNameEnterpriseId
()
{
return
showNameEnterpriseId
;
}
public
void
setShowNameEnterpriseId
(
String
showNameEnterpriseId
)
{
this
.
showNameEnterpriseId
=
showNameEnterpriseId
;
}
public
int
getShowStoreNames
()
{
return
showStoreNames
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
1f39ed25
...
...
@@ -1122,6 +1122,40 @@ public class GroupChatServiceImpl implements GroupChatService {
PageHelper
.
startPage
(
basePageInfo
);
List
<
GroupChatOwnerDTO
>
list
=
this
.
groupChatOwnerMapper
.
listOwner
(
qdto
);
Page
<
GroupChatOwnerDTO
>
retPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
list
,
GroupChatOwnerDTO
.
class
);
// 拼门店名称
if
(
CollectionUtils
.
isNotEmpty
(
retPage
.
getResult
())
&&
qdto
.
getShowStoreNames
()==
1
&&
StringUtils
.
isNotBlank
(
qdto
.
getShowNameEnterpriseId
()))
{
List
<
String
>
staffIdList
=
retPage
.
getResult
().
stream
().
map
(
GroupChatOwnerDTO:
:
getStaffId
).
collect
(
Collectors
.
toList
());
List
<
StaffClerkRelationDTO
>
staffList
=
this
.
staffClerkRelationService
.
listByWxEnterpriseIdAndStaffId
(
qdto
.
getWxEnterpriseId
(),
staffIdList
.
stream
().
collect
(
Collectors
.
toSet
()))
;
Map
<
String
,
List
<
StaffClerkRelationDTO
>>
staffMap
=
staffList
.
stream
().
collect
(
Collectors
.
groupingBy
(
StaffClerkRelationDTO:
:
getEnterpriseId
))
;
staffList
=
staffList
.
stream
().
filter
(
o
->
o
.
getEnterpriseId
().
equals
(
qdto
.
getShowNameEnterpriseId
())
&&
StringUtils
.
isNotBlank
(
o
.
getStoreId
())).
collect
(
Collectors
.
toList
());
Map
<
String
,
String
>
storeNameMap
=
new
HashMap
<>()
;
if
(
CollectionUtils
.
isNotEmpty
(
staffList
))
{
List
<
String
>
storeIdList
=
staffList
.
stream
().
filter
(
o
->
StringUtils
.
isNotEmpty
(
o
.
getStoreId
())).
map
(
o
->
o
.
getStoreId
()).
collect
(
Collectors
.
toList
())
;
if
(
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
String
[]
arr
=
new
String
[
storeIdList
.
size
()]
;
for
(
int
i
=
0
;
i
<
storeIdList
.
size
();
i
++)
{
arr
[
i
]
=
storeIdList
.
get
(
i
)
;
}
List
<
StoreDTO
>
storeList
=
this
.
storeService
.
getStores
(
arr
)
;
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
storeNameMap
=
storeList
.
stream
().
collect
(
Collectors
.
toMap
(
StoreDTO:
:
getStoreId
,
o
->
o
.
getStoreName
(),(
k1
,
k2
)->
k1
))
;
}
}
}
for
(
GroupChatOwnerDTO
item
:
retPage
.
getResult
())
{
String
staffId
=
item
.
getStaffId
()
;
List
<
StaffClerkRelationDTO
>
relationList
=
staffMap
.
get
(
staffId
)
;
List
<
String
>
storeNameList
=
new
ArrayList
<>()
;
if
(
CollectionUtils
.
isNotEmpty
(
relationList
))
{
for
(
StaffClerkRelationDTO
relation
:
relationList
)
{
if
(
StringUtils
.
isNotBlank
(
relation
.
getStoreId
())
&&
storeNameMap
.
containsKey
(
relation
.
getStoreId
()))
{
storeNameList
.
add
(
storeNameMap
.
get
(
relation
.
getStoreId
()));
}
}
}
item
.
setStoreNames
(
String
.
join
(
","
,
storeNameList
));
}
}
return
retPage
;
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatController.java
View file @
1f39ed25
...
...
@@ -276,6 +276,7 @@ public class GroupChatController {
String
paramsEnterpriseId
=
qdto
.
getParamsEnterpriseId
()
;
if
(
StringUtils
.
isNotBlank
(
paramsEnterpriseId
))
{
qdto
.
setShowStoreNames
(
1
);
qdto
.
setShowNameEnterpriseId
(
paramsEnterpriseId
);
}
else
{
List
<
EnterpriseDetailDTO
>
list
=
this
.
wxEnterpriseRelatedApiService
.
listEnterpriseByWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
(),
loginUser
.
getPhoneNumber
(),
false
)
;
if
(
CollectionUtils
.
isEmpty
(
list
))
{
...
...
@@ -283,8 +284,8 @@ public class GroupChatController {
}
if
(
list
.
size
()==
1
)
{
qdto
.
setShowStoreNames
(
1
);
qdto
.
setShowNameEnterpriseId
(
list
.
get
(
0
).
getEnterpriseId
());
}
qdto
.
setParamsEnterpriseId
(
list
.
get
(
0
).
getEnterpriseId
());
}
ServiceResponse
<
Page
<
GroupChatOwnerDTO
>>
resp
=
this
.
groupChatApiService
.
listOwnerPage
(
qdto
,
basePageInfo
);
return
RestResponse
.
successResult
(
resp
.
getResult
());
...
...
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