|
@@ -24,13 +24,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.MapBuilder;
|
|
|
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 org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
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.web.client.RestTemplate;
|
|
|
|
|
@@ -76,10 +77,11 @@ public class DataDashboardService {
|
|
|
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);
|
|
|
exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12");
|
|
|
+ return ReturnT.SUCCESS;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -356,6 +358,7 @@ public class DataDashboardService {
|
|
|
if (sumFission0 > 0) {
|
|
|
obj.setFission1Fission0Rate((sumFission1 * 1.0) / sumFission0);
|
|
|
}
|
|
|
+ result.add(obj);
|
|
|
// aigc 数据
|
|
|
PublishAccount publishAccount = publishAccountMap.get(article.getGhId());
|
|
|
Map<String, PublishContent> titleContentMap = publishContentMap.get(publishAccount.getId());
|
|
@@ -411,7 +414,6 @@ public class DataDashboardService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- result.add(obj);
|
|
|
}
|
|
|
result.sort(Comparator.comparing(NewSortStrategyExport::getDateStr).reversed()
|
|
|
.thenComparing(NewSortStrategyExport::getGhId).thenComparing(NewSortStrategyExport::getPosition));
|