yumeng 5 лет назад
Родитель
Сommit
fca21dcaa9

+ 15 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -95,6 +95,21 @@ public class TestController {
     }
 
 
+    @GetMapping(value = "/getAccountReport")
+    public String getAccountReport(Long accountId, String startDate, String endDate) throws ParseException {
+        QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
+        oauthTokenQueryWrapper.eq("media_id", 2);
+        oauthTokenQueryWrapper.eq("account_id", accountId);
+        oauthTokenQueryWrapper.last("limit 1");
+        CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
+        SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
+        Date date1 = sim.parse(startDate);
+        Date date2 = sim.parse(endDate);
+        kuaishouInterfaceService.getAdvertiserReportDaily(token, date1, date2);
+        return "Success";
+    }
+
+
     @GetMapping(value = "/updateCode")
     public String updateCode() {
         List<MaterialInfo> list = materialInfoService.list();
@@ -386,9 +401,6 @@ public class TestController {
     private IReportService reportService;
 
 
-
-
-
     @Autowired
     private IBytedancePlanHourlyReportService planHourlyReportService;