Commit 0963619f by liushuangwu

Scheduled

1 parent 714b6e64
......@@ -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>\"}";
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!