|
@@ -26,13 +26,14 @@ import com.tzld.longarticle.recommend.server.repository.mapper.longArticle.LongA
|
|
|
import com.tzld.longarticle.recommend.server.util.DateUtils;
|
|
import com.tzld.longarticle.recommend.server.util.DateUtils;
|
|
|
import com.tzld.longarticle.recommend.server.util.MapBuilder;
|
|
import com.tzld.longarticle.recommend.server.util.MapBuilder;
|
|
|
import com.tzld.longarticle.recommend.server.util.feishu.FeiShu;
|
|
import com.tzld.longarticle.recommend.server.util.feishu.FeiShu;
|
|
|
|
|
+import com.xxl.job.core.biz.model.ReturnT;
|
|
|
|
|
+import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.util.Pair;
|
|
import org.springframework.data.util.Pair;
|
|
|
import org.springframework.http.*;
|
|
import org.springframework.http.*;
|
|
|
-import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
@@ -78,10 +79,11 @@ public class DataDashboardService {
|
|
|
exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12");
|
|
exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Scheduled(cron = "0 0 4 * * ?")
|
|
|
|
|
- public void scheduledExport() {
|
|
|
|
|
|
|
+ @XxlJob("scheduledExport")
|
|
|
|
|
+ public ReturnT<String> scheduledExport(String param) {
|
|
|
List<String> dateStrList = DateUtils.getBeforeDays(null, 5);
|
|
List<String> dateStrList = DateUtils.getBeforeDays(null, 5);
|
|
|
exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12");
|
|
exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12");
|
|
|
|
|
+ return ReturnT.SUCCESS;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|