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
b7c10a9c
Commit
b7c10a9c
authored
Dec 22, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LOG
parent
41b57c04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
26 deletions
+39
-26
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+39
-26
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
b7c10a9c
...
...
@@ -260,34 +260,47 @@ public class GroupChatServiceImpl implements GroupChatService {
// 处理群通知
@Override
public
void
handChatNotice
(
String
params
)
{
logger
.
info
(
"企微群定时,企微通知"
);
List
<
Integer
>
typeList
=
Arrays
.
asList
(
1
,
2
,
3
);
Date
endTime
=
new
Date
();
Date
startTime
=
DateUtil
.
addNumForMinute
(
endTime
,
-
30
);
List
<
TabChatNotice
>
list
=
this
.
chatNoticeMapper
.
listAll
(
typeList
,
startTime
,
endTime
);
logger
.
info
(
"开始群通知定时,count={}"
,
list
.
size
());
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
;
}
this
.
chatNoticeMapper
.
closeAll
(
typeList
,
startTime
,
endTime
);
for
(
TabChatNotice
item
:
list
)
{
try
{
int
type
=
item
.
getType
();
String
wxEnterpriseId
=
item
.
getWxEnterpriseId
();
Long
groupChatId
=
item
.
getChatId
();
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
type
==
1
)
{
this
.
updateGroupChatDetail
(
qwDTO
,
groupChatId
,
false
);
}
if
(
type
==
2
)
{
this
.
updateChatStatus
(
qwDTO
,
groupChatId
);
}
if
(
type
==
3
)
{
this
.
updateGroupChatDetail
(
qwDTO
,
groupChatId
,
true
);
logger
.
info
(
"企微群定时,处理群通知"
);
String
key
=
"handChatNotice"
;
try
{
Object
o
=
RedisUtil
.
getCache
(
key
);
if
(
null
!=
o
)
{
logger
.
info
(
"有缓存,进行中"
);
return
;
}
RedisUtil
.
setCache
(
key
,
"1"
);
List
<
Integer
>
typeList
=
Arrays
.
asList
(
1
,
2
,
3
);
Date
endTime
=
new
Date
();
Date
startTime
=
DateUtil
.
addNumForMinute
(
endTime
,
-
30
);
List
<
TabChatNotice
>
list
=
this
.
chatNoticeMapper
.
listAll
(
typeList
,
startTime
,
endTime
);
logger
.
info
(
"开始群通知定时,count={}"
,
list
.
size
());
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
;
}
this
.
chatNoticeMapper
.
closeAll
(
typeList
,
startTime
,
endTime
);
for
(
TabChatNotice
item
:
list
)
{
try
{
int
type
=
item
.
getType
();
String
wxEnterpriseId
=
item
.
getWxEnterpriseId
();
Long
groupChatId
=
item
.
getChatId
();
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
type
==
1
)
{
this
.
updateGroupChatDetail
(
qwDTO
,
groupChatId
,
false
);
}
if
(
type
==
2
)
{
this
.
updateChatStatus
(
qwDTO
,
groupChatId
);
}
if
(
type
==
3
)
{
this
.
updateGroupChatDetail
(
qwDTO
,
groupChatId
,
true
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
RedisUtil
.
delCache
(
key
);
}
}
...
...
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