|
@@ -110,6 +110,31 @@ public class TestController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @GetMapping(value = "/getHistoryData")
|
|
|
+ public String getHistoryData(String startDate, String endDate) {
|
|
|
+ Result<String> result = new Result<>();
|
|
|
+ try {
|
|
|
+ SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date date1 = sim.parse(startDate);
|
|
|
+ Date date2 = sim.parse(endDate);
|
|
|
+
|
|
|
+ QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
|
|
|
+ tokenQueryWrapper.eq("media_id", 2);
|
|
|
+ List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(tokenQueryWrapper);
|
|
|
+ if (!Check.isNull(ctopOauthTokens)) {
|
|
|
+ for (CtopOauthToken token : ctopOauthTokens) {
|
|
|
+ kuaishouInterfaceService.getAdvertiserReportDaily(token, date1, date2);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ result.setSuccess(false);
|
|
|
+ }
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping(value = "/updateCode")
|
|
|
public String updateCode() {
|
|
|
List<MaterialInfo> list = materialInfoService.list();
|