123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package com.tzld.longarticle.recommend.server;
- import com.alibaba.fastjson.JSONObject;
- import com.tzld.longarticle.recommend.server.model.vo.IntermediateIndicatorsExport;
- import com.tzld.longarticle.recommend.server.model.vo.NewSortStrategyExport;
- import com.tzld.longarticle.recommend.server.service.recommend.DataDashboardService;
- import com.tzld.longarticle.recommend.server.util.DateUtils;
- import com.tzld.longarticle.recommend.server.util.feishu.FeiShu;
- import lombok.extern.slf4j.Slf4j;
- import org.junit.jupiter.api.Test;
- import org.springframework.boot.test.context.SpringBootTest;
- import org.springframework.data.util.Pair;
- import org.springframework.http.HttpHeaders;
- import javax.annotation.Resource;
- import java.util.List;
- @SpringBootTest(classes = Application.class)
- @Slf4j
- public class DataDashboardTest {
- @Resource
- DataDashboardService dataDashboardService;
- @Test
- public void test() {
- List<IntermediateIndicatorsExport> result = dataDashboardService.intermediateIndicatorsData("20241225");
- log.info(JSONObject.toJSONString(result));
- }
- @Test
- public void newSortStrategyData() {
- List<NewSortStrategyExport> result = dataDashboardService.newSortStrategyData("20241222",
- "20241223", "9", 0);
- log.info(JSONObject.toJSONString(result));
- }
- @Test
- public void producePlanAuditExport() {
- List<String> dateStrList = DateUtils.getBeforeDays(null, null, 86);
- dataDashboardService.producePlanAuditExport(dateStrList);
- }
- @Test
- public void delFeishuSheet() {
- List<String> delDateStrList = DateUtils.getBeforeDays(null, null, 14);
- Pair<String, Integer> token = FeiShu.requestAccessToken();
- HttpHeaders httpHeaders = new HttpHeaders();
- httpHeaders.add("Authorization", "Bearer " + token.getFirst());
- dataDashboardService.delFeishuSheet(httpHeaders, "7d4e12", 2, delDateStrList);
- }
- }
|