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
42b72490
Commit
42b72490
authored
Feb 07, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转移群的状态定时处理
parent
e0f455fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
+35
-0
GroupChatMapper.java
...aoban/manage/service/dao/mapper/chat/GroupChatMapper.java
+3
-0
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+27
-0
GroupChatMapper.xml
...ervice/src/main/resources/mapper/chat/GroupChatMapper.xml
+5
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/chat/GroupChatMapper.java
View file @
42b72490
...
@@ -73,4 +73,6 @@ public interface GroupChatMapper {
...
@@ -73,4 +73,6 @@ public interface GroupChatMapper {
public
void
updateChatEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
public
void
updateChatEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"groupChatIdList"
)
List
<
Long
>
groupChatIdList
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"groupChatIdList"
)
List
<
Long
>
groupChatIdList
,
@Param
(
"force"
)
int
force
);
@Param
(
"force"
)
int
force
);
public
List
<
GroupChatDTO
>
listChangeOwner
()
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
42b72490
...
@@ -392,6 +392,27 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -392,6 +392,27 @@ public class GroupChatServiceImpl implements GroupChatService {
}
}
this
.
syncGroupChatList
(
qwDTO
,
Arrays
.
asList
(
userId
),
null
,
false
);
this
.
syncGroupChatList
(
qwDTO
,
Arrays
.
asList
(
userId
),
null
,
false
);
}
}
private
void
updateChatStatusTimer
()
{
List
<
GroupChatDTO
>
dtoList
=
this
.
groupChatMapper
.
listChangeOwner
()
;
if
(
CollectionUtils
.
isNotEmpty
(
dtoList
))
{
for
(
GroupChatDTO
dto
:
dtoList
)
{
String
staffId
=
dto
.
getStaffId
();
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
()
;
TabHaobanStaff
staff
=
this
.
staffMapper
.
selectByPrimaryKey
(
staffId
);
if
(
null
==
staff
)
{
logger
.
info
(
"群主已删除,staffid={}"
,
staffId
);
continue
;
}
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
String
userId
=
staff
.
getWxUserId
();
if
(
qwDTO
.
needOpenUserId3th
())
{
userId
=
staff
.
getWxOpenUseId
();
}
this
.
syncGroupChatList
(
qwDTO
,
Arrays
.
asList
(
userId
),
null
,
false
);
}
}
}
@Override
@Override
public
void
initHaobaonGroupChat
(
String
params
)
{
public
void
initHaobaonGroupChat
(
String
params
)
{
...
@@ -448,6 +469,12 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -448,6 +469,12 @@ public class GroupChatServiceImpl implements GroupChatService {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
try
{
logger
.
info
(
"转移群的状态"
);
this
.
updateChatStatusTimer
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
private
void
dimissionOwner
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUserId
)
{
private
void
dimissionOwner
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUserId
)
{
...
...
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatMapper.xml
View file @
42b72490
...
@@ -359,4 +359,8 @@
...
@@ -359,4 +359,8 @@
and delete_flag = 0
and delete_flag = 0
</update>
</update>
<select
id=
"listChangeOwner"
resultType=
"com.gic.haoban.manage.api.dto.chat.GroupChatDTO"
>
select wx_enterprise_id , staff_id FROM tab_haoban_group_chat WHERE update_time > DATE_ADD(NOW(),INTERVAL -7 DAY) AND chat_status = 2 and staff_id is not null
</select>
</mapper>
</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