Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
zhangshaowu
/
pipi-helper
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0963619f
authored
Oct 16, 2022
by
liushuangwu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Scheduled
1 parent
714b6e64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
src/main/java/com/pipihelper/project/scheduled/MassageNoticeScheduleService.java
View file @
0963619
...
...
@@ -20,8 +20,8 @@ import com.pipihelper.project.feishu.service.PainService;
import
com.pipihelper.project.feishu.service.massage.MassageService
;
import
com.pipihelper.project.utils.CacheUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
...
...
@@ -70,11 +70,11 @@ public class MassageNoticeScheduleService {
floorCountMap
.
put
(
14
,
30
);
}
// /**
// /**
// * 每周四定时生成要按摩的人员名单,并发送大群和单人消息
// */
// @Async
// @Scheduled(cron = "0 0 10 * * ?
")
@Scheduled
(
cron
=
"0 0 11 ? * THU
"
)
public
void
sendMsgCardToPipiChat
()
{
employeeService
.
uprsetAllEmployee
();
chatMessageService
.
deleteAll
();
...
...
@@ -156,13 +156,17 @@ public class MassageNoticeScheduleService {
}
}
}
/**
* 每周四18:00删除当天的群聊
*/
// @Async
// @Scheduled(cron = "0 0 18
* * ?")
@Scheduled
(
cron
=
"0 0 19
* * ?"
)
public
void
deleteChatList
()
{
String
chatId
=
(
String
)
CacheUtil
.
get
(
"chatId"
);
if
(
StringUtils
.
isEmpty
(
chatId
))
{
return
;
}
feiShuApiService
.
deleteChatList
(
chatId
);
}
...
...
@@ -171,7 +175,7 @@ public class MassageNoticeScheduleService {
* 当天时间2:55,给第一波三个人更新卡片,并发送应用内提醒
*/
// @Async
// @Scheduled(cron = "0 0 10 * * ?
")
@Scheduled
(
cron
=
"0 55 14 ? * THU
"
)
public
void
massageStart
()
{
List
<
Pain
>
pains
=
painService
.
findListAsc
(
3
);
// String msg = "{\"text\":\"当前按摩进度:<at user_id=\\\"%s\\\">%s</at> <at user_id=\\\"%s\\\">%s</at> <at user_id=\\\"%s\\\">%s</at>\"}";
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment