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
5f43808d
Commit
5f43808d
authored
Dec 13, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群主查询
parent
ba131d6f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
5 deletions
+51
-5
OwnerSearchQDTO.java
.../gic/haoban/manage/api/dto/qdto/chat/OwnerSearchQDTO.java
+10
-0
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+26
-4
GroupChatUserServiceImpl.java
...e/service/service/chat/impl/GroupChatUserServiceImpl.java
+1
-1
GroupChatOwnerMapper.xml
...e/src/main/resources/mapper/chat/GroupChatOwnerMapper.xml
+14
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/chat/OwnerSearchQDTO.java
View file @
5f43808d
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
qdto
.
chat
;
import
java.io.Serializable
;
import
java.util.List
;
/**
*
...
...
@@ -22,8 +23,17 @@ public class OwnerSearchQDTO implements Serializable {
private
String
wxEnterpriseId
;
private
String
searchParams
;
private
String
departmentId
;
private
List
<
String
>
departmentIdList
;
// 1查询在职 2查离职
private
int
status
=
1
;
public
List
<
String
>
getDepartmentIdList
()
{
return
departmentIdList
;
}
public
void
setDepartmentIdList
(
List
<
String
>
departmentIdList
)
{
this
.
departmentIdList
=
departmentIdList
;
}
public
String
getDepartmentId
()
{
return
departmentId
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
5f43808d
...
...
@@ -25,6 +25,7 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.base.api.common.Constant
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
...
...
@@ -43,6 +44,7 @@ import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatMapper;
import
com.gic.haoban.manage.service.dao.mapper.chat.GroupChatOwnerHistoryMapper
;
import
com.gic.haoban.manage.service.dao.mapper.chat.GroupChatOwnerMapper
;
import
com.gic.haoban.manage.service.dao.mapper.chat.GroupChatUserMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
...
...
@@ -54,6 +56,7 @@ import com.gic.haoban.manage.service.entity.chat.TabGroupChatOwner;
import
com.gic.haoban.manage.service.entity.chat.TabGroupChatOwnerHistory
;
import
com.gic.haoban.manage.service.entity.chat.TabGroupChatUser
;
import
com.gic.haoban.manage.service.pojo.bo.chat.GroupChatBO
;
import
com.gic.haoban.manage.service.service.DepartmentService
;
import
com.gic.haoban.manage.service.service.SecretSettingService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
...
...
@@ -109,6 +112,8 @@ public class GroupChatServiceImpl implements GroupChatService {
private
GroupChatHmService
groupChatHmService
;
@Autowired
private
GroupChatHmRelationMapper
groupChatHmRelationMapper
;
@Autowired
private
DepartmentService
departmentService
;
private
static
GicMQClient
mqClient
=
GICMQClientUtil
.
getClientInstance
();
...
...
@@ -486,15 +491,15 @@ public class GroupChatServiceImpl implements GroupChatService {
.
collect
(
Collectors
.
toMap
(
TabGroupChatUser:
:
getUserId
,
o
->
o
,
((
k1
,
k2
)
->
k1
)));
List
<
TabGroupChatUser
>
needAddUserList
=
new
ArrayList
<>();
int
totalMemberCount
=
0
;
List
<
GroupChatUserIdDTO
>
adminList
=
detail
.
getAdmin_list
()
;
List
<
String
>
adminIdList
=
adminList
.
stream
().
map
(
dto
->
dto
.
getUserid
()).
collect
(
Collectors
.
toList
())
;
List
<
GroupChatUserIdDTO
>
adminList
=
detail
.
getAdmin_list
();
List
<
String
>
adminIdList
=
adminList
.
stream
().
map
(
dto
->
dto
.
getUserid
()).
collect
(
Collectors
.
toList
())
;
for
(
GroupChatDetailMemberDTO
member
:
memberList
)
{
String
userId
=
member
.
getUserid
();
TabGroupChatUser
user
=
userMap
.
get
(
userId
);
user
.
setAdminFlag
(
0
);
if
(
member
.
getUserid
().
equals
(
owner
))
{
if
(
member
.
getUserid
().
equals
(
owner
))
{
user
.
setAdminFlag
(
1
);
}
else
if
(
adminIdList
.
contains
(
member
.
getUserid
()))
{
}
else
if
(
adminIdList
.
contains
(
member
.
getUserid
()))
{
user
.
setAdminFlag
(
2
);
}
if
(
null
!=
user
)
{
...
...
@@ -721,6 +726,23 @@ public class GroupChatServiceImpl implements GroupChatService {
@Override
public
Page
<
GroupChatOwnerDTO
>
listOwnerPage
(
OwnerSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
List
<
String
>
departmentIdList
=
new
ArrayList
<>();
String
departmentId
=
qdto
.
getDepartmentId
();
if
(
StringUtils
.
isNotBlank
(
departmentId
))
{
TabHaobanDepartment
department
=
this
.
departmentService
.
selectById
(
departmentId
);
if
(
department
!=
null
)
{
String
parentDepartmentId
=
department
.
getParentDepartmentId
();
if
(!
"0"
.
equals
(
parentDepartmentId
))
{
String
chainId
=
department
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
departmentId
;
departmentIdList
.
add
(
departmentId
);
List
<
TabHaobanDepartment
>
tabList
=
departmentService
.
listByChainId
(
chainId
,
qdto
.
getWxEnterpriseId
());
List
<
String
>
departmentIds
=
tabList
.
stream
().
map
(
TabHaobanDepartment:
:
getDepartmentId
)
.
collect
(
Collectors
.
toList
());
departmentIdList
.
addAll
(
departmentIds
);
}
}
}
PageHelper
.
startPage
(
basePageInfo
);
List
<
GroupChatOwnerDTO
>
list
=
this
.
groupChatOwnerMapper
.
listOwner
(
qdto
);
Page
<
GroupChatOwnerDTO
>
retPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
list
,
GroupChatOwnerDTO
.
class
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatUserServiceImpl.java
View file @
5f43808d
...
...
@@ -22,7 +22,7 @@ public class GroupChatUserServiceImpl implements GroupChatUserService {
@Override
public
Page
<
GroupChatUserDTO
>
listPage
(
GroupChatUserSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
PageHelper
.
startPage
(
basePageInfo
);
PageHelper
.
startPage
(
basePageInfo
);
List
<
GroupChatUserDTO
>
list
=
this
.
groupChatUserMapper
.
listPage
(
qdto
);
Page
<
GroupChatUserDTO
>
retPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
list
,
GroupChatUserDTO
.
class
);
return
retPage
;
...
...
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatOwnerMapper.xml
View file @
5f43808d
...
...
@@ -54,7 +54,16 @@
SELECT a.staff_id staffId , b.`staff_name` staffName , a.wx_enterprise_id wxEnterpriseId ,
b.wx_user_id wxUserId , b.wx_open_user_id wxOpenUserId
FROM tab_haoban_group_chat_owner a LEFT JOIN tab_haoban_staff b ON a.`staff_id` = b.`staff_id`
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
left join tab_haoban_staff_department_related c on a.staff_id = c.staff_id and c.status_flag = 1
</if>
where a.wx_enterprise_id=#{wxEnterpriseId}
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
and c.department_id IN
<foreach
collection=
"departmentIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</if>
<if
test=
"null != searchParams"
>
and b.staff_name like '%${searchParams}%'
</if>
...
...
@@ -64,5 +73,9 @@
<if
test=
"status==2"
>
and b.status_flag = 0
</if>
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
group by a.statff_id
</if>
</select>
</mapper>
\ No newline at end of file
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