DataDashboardTest.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package com.tzld.longarticle.recommend.server;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.tzld.longarticle.recommend.server.model.vo.IntermediateIndicatorsExport;
  4. import com.tzld.longarticle.recommend.server.model.vo.NewSortStrategyExport;
  5. import com.tzld.longarticle.recommend.server.service.recommend.DataDashboardService;
  6. import com.tzld.longarticle.recommend.server.util.DateUtils;
  7. import lombok.extern.slf4j.Slf4j;
  8. import org.junit.jupiter.api.Test;
  9. import org.springframework.boot.test.context.SpringBootTest;
  10. import javax.annotation.Resource;
  11. import java.util.List;
  12. @SpringBootTest(classes = Application.class)
  13. @Slf4j
  14. public class DataDashboardTest {
  15. @Resource
  16. DataDashboardService dataDashboardService;
  17. @Test
  18. public void test() {
  19. List<IntermediateIndicatorsExport> result = dataDashboardService.intermediateIndicatorsData("20241129");
  20. log.info(JSONObject.toJSONString(result));
  21. }
  22. @Test
  23. public void newSortStrategyData() {
  24. List<NewSortStrategyExport> result = dataDashboardService.newSortStrategyData("20241222",
  25. "20241223", "9", 0);
  26. log.info(JSONObject.toJSONString(result));
  27. }
  28. @Test
  29. public void producePlanAuditExport() {
  30. List<String> dateStrList = DateUtils.getBeforeDays(null, null, 90);
  31. for (String dateStr : dateStrList) {
  32. dataDashboardService.producePlanAuditExport(dateStr);
  33. }
  34. }
  35. }