|
@@ -21,6 +21,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.util.Pair;
|
|
|
import org.springframework.http.*;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
@@ -54,6 +55,12 @@ public class DataDashboardService {
|
|
|
exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12");
|
|
|
}
|
|
|
|
|
|
+ @Scheduled(cron = "0 0 9 * * ?")
|
|
|
+ public void scheduledExport() {
|
|
|
+ List<String> dateStrList = getBeforeThreeDays(null);
|
|
|
+ exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12");
|
|
|
+ }
|
|
|
+
|
|
|
private List<String> getBeforeThreeDays(String dateStr) {
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
|
// 获取今天的日期
|