Browse Source

readMessage与secondTradeRemind方法迁移到xxljob中

qrs 1 week ago
parent
commit
54314dbb0a

+ 2 - 2
alien-store/src/main/java/shop/alien/store/task/ScheduledTask.java

@@ -295,7 +295,7 @@ public class ScheduledTask {
     /**
      * 二手交易平台 - 交易时间前的十分钟和十五分钟之间  给买家和卖家发送通知提醒
      */
-    @Scheduled(cron = "0 */5 * * * ?")
+//    @Scheduled(cron = "0 */5 * * * ?")
     public void secondTradeRemind() throws Exception {
         LocalDateTime now = LocalDateTime.now();
         // 五分钟后
@@ -374,7 +374,7 @@ public class ScheduledTask {
     /**
      * 每分钟从redis中读取已读的消息id 并将数据库设为已读
      */
-    @Scheduled(cron = "0 * * * * ?")
+//    @Scheduled(cron = "0 * * * * ?")
     public void readMessage() {
         try {
             if (CollectionUtil.isEmpty(baseRedisService.getList("readMessageIdKey"))) return;