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
b725c9b8
Commit
b725c9b8
authored
Dec 22, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群主离职状态处理
parent
6901685a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
2 deletions
+49
-2
GroupChatOwnerMapper.java
.../manage/service/dao/mapper/chat/GroupChatOwnerMapper.java
+11
-0
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+29
-1
GroupChatOwnerMapper.xml
...e/src/main/resources/mapper/chat/GroupChatOwnerMapper.xml
+9
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/chat/GroupChatOwnerMapper.java
View file @
b725c9b8
...
...
@@ -26,4 +26,14 @@ public interface GroupChatOwnerMapper {
public
int
updateChatCount
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"chatCount"
)
int
chatCount
);
public
List
<
GroupChatOwnerDTO
>
listOwner
(
OwnerSearchQDTO
qdto
);
/**
*
* @Title: dimissionOwnerList
* @Description: 查询处理离职的群主
* @author xugh
* @return
* @throws
*/
public
List
<
GroupChatOwnerDTO
>
dimissionOwnerList
();
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
b725c9b8
...
...
@@ -143,6 +143,7 @@ public class GroupChatServiceImpl implements GroupChatService {
@Override
public
void
createChat
(
String
corpid
,
String
wxChatId
)
{
logger
.
info
(
"创建群,id={}"
,
wxChatId
);
String
wxEnterpriseId
=
this
.
getWxEnterpriesId
(
corpid
);
if
(
null
==
wxEnterpriseId
)
{
return
;
...
...
@@ -363,8 +364,35 @@ public class GroupChatServiceImpl implements GroupChatService {
}
finally
{
RedisUtil
.
delCache
(
key
);
}
// 群主离职列表
List
<
GroupChatOwnerDTO
>
dimissionOwnerList
=
this
.
groupChatOwnerMapper
.
dimissionOwnerList
()
;
for
(
GroupChatOwnerDTO
dto
:
dimissionOwnerList
)
{
logger
.
info
(
"群主离职,群状态处理={}"
,
JSON
.
toJSONString
(
dto
));
this
.
dimissionOwner
(
dto
);
}
}
private
void
dimissionOwner
(
GroupChatOwnerDTO
dto
)
{
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
()
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
null
==
qwDTO
)
{
logger
.
info
(
"wxEnterpriseId不存在,id={}"
,
wxEnterpriseId
);
return
;
}
List
<
String
>
userIdList
=
null
;
if
(
qwDTO
.
needOpenUserIdDk
())
{
userIdList
=
Arrays
.
asList
(
dto
.
getWxOpenUserId
());
}
else
{
userIdList
=
Arrays
.
asList
(
dto
.
getWxUserId
());
}
if
(
CollectionUtils
.
isNotEmpty
(
userIdList
))
{
this
.
syncGroupChatList
(
qwDTO
,
userIdList
,
null
,
false
);
}
}
/**
* 初始化整个群数据,拉取所有成员的所有群,并立即获取群信息、群成员、同时也会匹配客户标识
*/
...
...
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatOwnerMapper.xml
View file @
b725c9b8
...
...
@@ -76,6 +76,13 @@
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
group by a.staff_id
</if>
</select>
<select
id=
"dimissionOwnerList"
resultType=
"com.gic.haoban.manage.api.dto.chat.GroupChatOwnerDTO"
>
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`
where a.wx_enterprise_id=#{wxEnterpriseId} and b.status_flag = 0 and b.update_time > DATE_ADD(CURDATE(), INTERVAL -1 DAY)
</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