Sfoglia il codice sorgente

修复小程序端完成任务时会影响到其他时间任务问题

leon 4 anni fa
parent
commit
4f56a6aba5

+ 3 - 0
src/main/java/com/mokamrp/privates/task/pangu/SyncFosterwxTaskEdit.java

@@ -15,6 +15,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.List;
 
@@ -65,10 +66,12 @@ public class SyncFosterwxTaskEdit {
                 if (!fosterwxTaskSchedule.getTaskStatus().equals(0)) {
                     save.setTaskStatus(fosterwxTaskSchedule.getTaskStatus());
                 }
+                LocalDate nowDate = LocalDate.now();
                 //.更新
                 fosterwxTaskScheduleService.update(save, new QueryWrapper<FosterwxTaskSchedule>()
                         .eq("station_id", fosterwxTaskSchedule.getStationId())
                         .eq("task_id", fosterwxTaskSchedule.getTaskId())
+                        .eq("send_date",nowDate)
                 );
                 syncNewFosterwxTask.execute();
             } catch (InterruptedException ie) {