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
0d303edd
Commit
0d303edd
authored
Apr 18, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群主群数量
parent
768f3570
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+11
-1
GroupChatOwnerMapper.xml
...e/src/main/resources/mapper/chat/GroupChatOwnerMapper.xml
+1
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
0d303edd
...
...
@@ -182,6 +182,15 @@ public class GroupChatServiceImpl implements GroupChatService {
return
;
}
this
.
groupChatMapper
.
updateChatStatus
(
groupChat
.
getGroupChatId
(),
4
);
// 更新群数量
this
.
updateOwnerCount
(
groupChat
.
getStaffId
());
}
private
void
updateOwnerCount
(
String
staffId
)
{
if
(
StringUtils
.
isNotBlank
(
staffId
))
{
int
chatCount
=
this
.
groupChatMapper
.
getCountByStaffId
(
staffId
);
this
.
groupChatOwnerMapper
.
updateChatCount
(
staffId
,
chatCount
)
;
}
}
@Override
...
...
@@ -457,9 +466,9 @@ public class GroupChatServiceImpl implements GroupChatService {
logger
.
info
(
"群主离职,刷新群状态,staffId={}"
,
staffId
);
TabGroupChatOwner
owner
=
this
.
groupChatOwnerMapper
.
selectByStaffId
(
staffId
);
if
(
null
!=
owner
)
{
this
.
groupChatOwnerMapper
.
updateChatCount
(
staffId
,
owner
.
getChatCount
());
TabHaobanStaff
staff
=
this
.
staffMapper
.
selectByPrimaryKey
(
staffId
);
this
.
dimissionOwner
(
staff
.
getWxEnterpriseId
(),
staff
.
getWxUserId
(),
staff
.
getWxOpenUseId
());
this
.
updateOwnerCount
(
staffId
);
}
}
...
...
@@ -931,6 +940,7 @@ public class GroupChatServiceImpl implements GroupChatService {
}
if
(
StringUtils
.
isNotEmpty
(
oldStaffId
))
{
this
.
groupChatOwnerHistoryMapper
.
updateOwnerEnd
(
groupChatId
,
oldStaffId
);
this
.
updateOwnerCount
(
oldStaffId
);
}
}
...
...
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatOwnerMapper.xml
View file @
0d303edd
...
...
@@ -57,7 +57,7 @@
<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}
where a.wx_enterprise_id=#{wxEnterpriseId}
and a.chat_count > 0
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
and c.department_id IN
<foreach
collection=
"departmentIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
...
...
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