فهرست منبع

修改loadData sql

syh 4 سال پیش
والد
کامیت
3946e815a3
19فایلهای تغییر یافته به همراه1 افزوده شده و 1737 حذف شده
  1. 0 262
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActCustomFormController.java
  2. 0 255
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActFormDataController.java
  3. 0 287
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActFormPorcessController.java
  4. 0 24
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  5. 0 47
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyAccountReportAsyncJob.java
  6. 0 53
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyAsyncJob.java
  7. 0 47
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyCampaignReportAsyncJob.java
  8. 0 48
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyCreativeReportAsyncJob.java
  9. 0 48
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyPlanReportAsyncJob.java
  10. 0 33
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyReportAsyncTaskGetJob.java
  11. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java
  12. 0 165
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceDailyReportTaskController.java
  13. 0 52
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportController.java
  14. 0 22
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceDailyReportTaskMapper.java
  15. 0 112
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceDailyReportTaskMapper.xml
  16. 0 14
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceDailyReportTaskService.java
  17. 0 6
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceReportService.java
  18. 0 21
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceDailyReportTaskServiceImpl.java
  19. 0 240
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java

+ 0 - 262
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActCustomFormController.java

@@ -1,262 +0,0 @@
-/*
-package org.jeecg.modules.ctop.controller;
-
-import cn.com.ctop.common.module.entity.ActCustomForm;
-import cn.com.ctop.common.module.service.IActCustomFormService;
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.shiro.SecurityUtils;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.system.vo.LoginUser;
-import org.jeecg.common.util.oConvertUtils;
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
- */
-/**
- * 自定义表单信息
- * @author jeecg-boot
- * @date   2020-08-25
- * @version V1.0
- *//*
-
-@Slf4j
-@Api(tags="自定义表单信息")
-@RestController
-@RequestMapping("/ctop/actCustomForm")
-public class ActCustomFormController {
-	@Autowired
-	private IActCustomFormService actCustomFormService;
-
-	*/
-/**
-	  * 分页列表查询
-	 * @param actCustomForm
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单信息-分页列表查询", notes="自定义表单信息-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<ActCustomForm>> queryPageList(ActCustomForm actCustomForm,
-													  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-													  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-													  HttpServletRequest req) {
-		Result<IPage<ActCustomForm>> result = new Result<>();
-		QueryWrapper<ActCustomForm> queryWrapper = QueryGenerator.initQueryWrapper(actCustomForm, req.getParameterMap());
-		Page<ActCustomForm> page = new Page<ActCustomForm>(pageNo, pageSize);
-		IPage<ActCustomForm> pageList = actCustomFormService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
-
-	*/
-/**
-	  *   添加
-	 * @param actCustomForm
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单信息-添加", notes="自定义表单信息-添加")
-	@PostMapping(value = "/add")
-	public Result<ActCustomForm> add(@RequestBody ActCustomForm actCustomForm) {
-		Result<ActCustomForm> result = new Result<>();
-		try {
-			LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-			actCustomForm.setUserId(user.getId());
-			actCustomForm.setStatus(1);
-			actCustomForm.setCreateTime(new Date());
-			actCustomForm.setUpdateTime(new Date());
-			actCustomFormService.save(actCustomForm);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
-
-	*/
-/**
-	  *  编辑
-	 * @param actCustomForm
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单信息-编辑", notes="自定义表单信息-编辑")
-	@PutMapping(value = "/edit")
-	public Result<ActCustomForm> edit(@RequestBody ActCustomForm actCustomForm) {
-		Result<ActCustomForm> result = new Result<ActCustomForm>();
-		ActCustomForm actCustomFormEntity = actCustomFormService.getById(actCustomForm.getId());
-		if(actCustomFormEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = actCustomFormService.updateById(actCustomForm);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
-
-		return result;
-	}
-
-	*/
-/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单信息-通过id删除", notes="自定义表单信息-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			actCustomFormService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
-
-	*/
-/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单信息-批量删除", notes="自定义表单信息-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<ActCustomForm> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<ActCustomForm> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.actCustomFormService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
-
-	*/
-/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单信息-通过id查询", notes="自定义表单信息-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<ActCustomForm> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<ActCustomForm> result = new Result<>();
-		ActCustomForm actCustomForm = actCustomFormService.getById(id);
-		if(actCustomForm==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(actCustomForm);
-			result.setSuccess(true);
-		}
-		return result;
-	}
-
-  */
-/**
-      * 导出excel
-   *
-   * @param request
-   * @param response
-   *//*
-
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
-      // Step.1 组装查询条件
-      QueryWrapper<ActCustomForm> queryWrapper = null;
-      try {
-          String paramsStr = request.getParameter("paramsStr");
-          if (oConvertUtils.isNotEmpty(paramsStr)) {
-              String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              ActCustomForm actCustomForm = JSON.parseObject(deString, ActCustomForm.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(actCustomForm, request.getParameterMap());
-          }
-      } catch (UnsupportedEncodingException e) {
-          e.printStackTrace();
-      }
-
-      //Step.2 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<ActCustomForm> pageList = actCustomFormService.list(queryWrapper);
-      //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "自定义表单信息列表");
-      mv.addObject(NormalExcelConstants.CLASS, ActCustomForm.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("自定义表单信息列表数据", "导出人:Jeecg", "导出信息"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
-  }
-
-  */
-/**
-      * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   *//*
-
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<ActCustomForm> listActCustomForms = ExcelImportUtil.importExcel(file.getInputStream(), ActCustomForm.class, params);
-              actCustomFormService.saveBatch(listActCustomForms);
-              return Result.ok("文件导入成功!数据行数:" + listActCustomForms.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.ok("文件导入失败!");
-  }
-
-}
-*/

+ 0 - 255
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActFormDataController.java

@@ -1,255 +0,0 @@
-/*
-package org.jeecg.modules.ctop.controller;
-
-import cn.com.ctop.common.module.entity.ActFormData;
-import cn.com.ctop.common.module.service.IActFormDataService;
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
- */
-/**
- * 自定义表单存储数据
- * @author jeecg-boot
- * @date   2020-08-25
- * @version V1.0
- *//*
-
-@Slf4j
-@Api(tags="自定义表单存储数据")
-@RestController
-@RequestMapping("/ctop/actFormData")
-public class ActFormDataController {
-	@Autowired
-	private IActFormDataService actFormDataService;
-
-	*/
-/**
-	  * 分页列表查询
-	 * @param actFormData
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单存储数据-分页列表查询", notes="自定义表单存储数据-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<ActFormData>> queryPageList(ActFormData actFormData,
-													@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-													@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-													HttpServletRequest req) {
-		Result<IPage<ActFormData>> result = new Result<>();
-		QueryWrapper<ActFormData> queryWrapper = QueryGenerator.initQueryWrapper(actFormData, req.getParameterMap());
-		Page<ActFormData> page = new Page<ActFormData>(pageNo, pageSize);
-		IPage<ActFormData> pageList = actFormDataService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
-
-	*/
-/**
-	  *   添加
-	 * @param actFormData
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单存储数据-添加", notes="自定义表单存储数据-添加")
-	@PostMapping(value = "/add")
-	public Result<ActFormData> add(@RequestBody ActFormData actFormData) {
-		Result<ActFormData> result = new Result<>();
-		try {
-			actFormData.setStatus(1);
-			actFormDataService.save(actFormData);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
-
-	*/
-/**
-	  *  编辑
-	 * @param actFormData
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单存储数据-编辑", notes="自定义表单存储数据-编辑")
-	@PutMapping(value = "/edit")
-	public Result<ActFormData> edit(@RequestBody ActFormData actFormData) {
-		Result<ActFormData> result = new Result<ActFormData>();
-		ActFormData actFormDataEntity = actFormDataService.getById(actFormData.getId());
-		if(actFormDataEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = actFormDataService.updateById(actFormData);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
-
-		return result;
-	}
-
-	*/
-/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单存储数据-通过id删除", notes="自定义表单存储数据-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			actFormDataService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
-
-	*/
-/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单存储数据-批量删除", notes="自定义表单存储数据-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<ActFormData> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<ActFormData> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.actFormDataService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
-
-	*/
-/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单存储数据-通过id查询", notes="自定义表单存储数据-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<ActFormData> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<ActFormData> result = new Result<>();
-		ActFormData actFormData = actFormDataService.getById(id);
-		if(actFormData==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(actFormData);
-			result.setSuccess(true);
-		}
-		return result;
-	}
-
-  */
-/**
-      * 导出excel
-   *
-   * @param request
-   * @param response
-   *//*
-
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
-      // Step.1 组装查询条件
-      QueryWrapper<ActFormData> queryWrapper = null;
-      try {
-          String paramsStr = request.getParameter("paramsStr");
-          if (oConvertUtils.isNotEmpty(paramsStr)) {
-              String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              ActFormData actFormData = JSON.parseObject(deString, ActFormData.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(actFormData, request.getParameterMap());
-          }
-      } catch (UnsupportedEncodingException e) {
-          e.printStackTrace();
-      }
-
-      //Step.2 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<ActFormData> pageList = actFormDataService.list(queryWrapper);
-      //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "自定义表单存储数据列表");
-      mv.addObject(NormalExcelConstants.CLASS, ActFormData.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("自定义表单存储数据列表数据", "导出人:Jeecg", "导出信息"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
-  }
-
-  */
-/**
-      * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   *//*
-
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<ActFormData> listActFormDatas = ExcelImportUtil.importExcel(file.getInputStream(), ActFormData.class, params);
-              actFormDataService.saveBatch(listActFormDatas);
-              return Result.ok("文件导入成功!数据行数:" + listActFormDatas.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.ok("文件导入失败!");
-  }
-
-}
-*/

+ 0 - 287
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActFormPorcessController.java

@@ -1,287 +0,0 @@
-/*
-package org.jeecg.modules.ctop.controller;
-
-import cn.com.ctop.common.module.entity.ActCustomForm;
-import cn.com.ctop.common.module.entity.ActFormPorcess;
-import cn.com.ctop.common.module.service.IActCustomFormService;
-import cn.com.ctop.common.module.service.IActFormPorcessService;
-import cn.com.ctop.common.module.utils.ResultMapUtils;
-import cn.com.ctop.common.module.utils.StatusCode;
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
-*/
-/*import org.jeecg.modules.activiti.entity.ActZprocess;
-import org.jeecg.modules.activiti.service.IActZprocessService;*//*
-
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
- */
-/**
- * 自定义表单关联流程信息
- * @author jeecg-boot
- * @date   2020-08-25
- * @version V1.0
- *//*
-
-@Slf4j
-@Api(tags="自定义表单关联流程信息")
-@RestController
-@RequestMapping("/ctop/actFormPorcess")
-public class ActFormPorcessController {
-	@Autowired
-	private IActZprocessService actZprocessService;
-	@Autowired
-	private IActFormPorcessService actFormPorcessService;
-	@Autowired
-	private IActCustomFormService customFormService;
-	@PostMapping("bindProcess")
-	public Map<String,Object>bindProcess(Long formId,String processId){
-		Map<String,Object>result = new HashMap<>();
-		if(null == formId||formId == 0||null == processId|| "".equals(processId.trim())){
-			ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
-			return result;
-		}
-		ActZprocess actZprocess = actZprocessService.getById(processId);
-		ActCustomForm customForm = customFormService.getById(formId);
-		if(null == actZprocess||null == customForm){
-			ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
-			return result;
-		}
-
-		ActFormPorcess actFormPorcess = new ActFormPorcess();
-		actFormPorcess.setFormId(formId);
-		actFormPorcess.setProcessId(processId);
-		actFormPorcess.setStatus(1);
-		actFormPorcessService.save(actFormPorcess);
-		return result;
-	}
-	*/
-/**
-	  * 分页列表查询
-	 * @param actFormPorcess
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单关联流程信息-分页列表查询", notes="自定义表单关联流程信息-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<ActFormPorcess>> queryPageList(ActFormPorcess actFormPorcess,
-													   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-													   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-													   HttpServletRequest req) {
-		Result<IPage<ActFormPorcess>> result = new Result<>();
-		QueryWrapper<ActFormPorcess> queryWrapper = QueryGenerator.initQueryWrapper(actFormPorcess, req.getParameterMap());
-		Page<ActFormPorcess> page = new Page<>(pageNo, pageSize);
-		IPage<ActFormPorcess> pageList = actFormPorcessService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
-
-	*/
-/**
-	  *   添加
-	 * @param actFormPorcess
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单关联流程信息-添加", notes="自定义表单关联流程信息-添加")
-	@PostMapping(value = "/add")
-	public Result<ActFormPorcess> add(@RequestBody ActFormPorcess actFormPorcess) {
-		Result<ActFormPorcess> result = new Result<>();
-		try {
-			actFormPorcessService.save(actFormPorcess);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
-
-	*/
-/**
-	  *  编辑
-	 * @param actFormPorcess
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单关联流程信息-编辑", notes="自定义表单关联流程信息-编辑")
-	@PutMapping(value = "/edit")
-	public Result<ActFormPorcess> edit(@RequestBody ActFormPorcess actFormPorcess) {
-		Result<ActFormPorcess> result = new Result<ActFormPorcess>();
-		ActFormPorcess actFormPorcessEntity = actFormPorcessService.getById(actFormPorcess.getId());
-		if(actFormPorcessEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = actFormPorcessService.updateById(actFormPorcess);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
-
-		return result;
-	}
-
-	*/
-/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单关联流程信息-通过id删除", notes="自定义表单关联流程信息-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			actFormPorcessService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
-
-	*/
-/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单关联流程信息-批量删除", notes="自定义表单关联流程信息-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<ActFormPorcess> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<ActFormPorcess> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.actFormPorcessService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
-
-	*/
-/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 *//*
-
-	@ApiOperation(value="自定义表单关联流程信息-通过id查询", notes="自定义表单关联流程信息-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<ActFormPorcess> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<ActFormPorcess> result = new Result<>();
-		ActFormPorcess actFormPorcess = actFormPorcessService.getById(id);
-		if(actFormPorcess==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(actFormPorcess);
-			result.setSuccess(true);
-		}
-		return result;
-	}
-
-  */
-/**
-      * 导出excel
-   *
-   * @param request
-   * @param response
-   *//*
-
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
-      // Step.1 组装查询条件
-      QueryWrapper<ActFormPorcess> queryWrapper = null;
-      try {
-          String paramsStr = request.getParameter("paramsStr");
-          if (oConvertUtils.isNotEmpty(paramsStr)) {
-              String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              ActFormPorcess actFormPorcess = JSON.parseObject(deString, ActFormPorcess.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(actFormPorcess, request.getParameterMap());
-          }
-      } catch (UnsupportedEncodingException e) {
-          e.printStackTrace();
-      }
-
-      //Step.2 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<ActFormPorcess> pageList = actFormPorcessService.list(queryWrapper);
-      //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "自定义表单关联流程信息列表");
-      mv.addObject(NormalExcelConstants.CLASS, ActFormPorcess.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("自定义表单关联流程信息列表数据", "导出人:Jeecg", "导出信息"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
-  }
-
-  */
-/**
-      * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   *//*
-
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<ActFormPorcess> listActFormPorcesss = ExcelImportUtil.importExcel(file.getInputStream(), ActFormPorcess.class, params);
-              actFormPorcessService.saveBatch(listActFormPorcesss);
-              return Result.ok("文件导入成功!数据行数:" + listActFormPorcesss.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.ok("文件导入失败!");
-  }
-
-}
-*/

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

@@ -1043,30 +1043,6 @@ public class TestController {
         });
     }
 
-
-    @GetMapping(value = "/BytedanceDailyAsyncJob")
-    public void BytedanceDailyAsyncJob() {
-        String startDate = "2020-06-01";
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        String endDate = DateUtils.formatDate(getDate);
-        endDate = "2020-06-02";
-        log.info("头条广告计划异步任务开始执行,跑的是" + startDate + "~" + endDate + "的数据");
-
-        List<CtopOauthToken> tokens = tokenService.getToutiaoTokenByCreateTime(endDate);
-        if (null == tokens || tokens.size() <= 0) {
-            log.info("头条获取异步报表数据任务执行失败:未获取到可用的token");
-            return;
-        }
-
-        //1.创意 2.广告主 3.广告组 4.广告计划
-        for (CtopOauthToken token : tokens) {
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 1);
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 2);
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 3);
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 4);
-        }
-    }
-
     @Autowired
     private IBytedanceEffectVideoInfoService effectVideoInfoService;
 

+ 0 - 47
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyAccountReportAsyncJob.java

@@ -1,47 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 头条素材报表按天跑前一天的数据任务
- *
- * @author sunzhen
- */
-@Slf4j
-public class BytedanceDailyAccountReportAsyncJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IBytedanceReportService bytedanceReportService;
-
-    @SneakyThrows
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        String date = DateUtils.formatDate(getDate);
-        log.info("头条异步广告主报表执行开始。跑的是:" + date + "的数据");
-        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
-        if (null == tokens || tokens.size() <= 0) {
-            log.info("头条获取异步报表数据任务执行失败:未获取到可用的token");
-            return;
-        }
-
-        for (CtopOauthToken token : tokens) {
-            bytedanceReportService.bytedanceAsyncTaskCreate(date, date, token, 2);  //1.创意 2.广告主 3.广告主 4.广告计划
-        }
-
-    }
-}

+ 0 - 53
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyAsyncJob.java

@@ -1,53 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 头条数据异步报表  获取前一天绑定的账户,跑从2020-01-01到前一天的数据;目的是防止新绑定账户数据缺失;
- *
- * @author sunzhen
- */
-@Slf4j
-public class BytedanceDailyAsyncJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IBytedanceReportService bytedanceReportService;
-
-    @SneakyThrows
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        String startDate = "2020-01-01";
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        String endDate = DateUtils.formatDate(getDate);
-
-        log.info("头条数据异步报表  获取前一天绑定的账户,跑从2020-01-01到前一天的数据,时间为:" + startDate + "~" + endDate + "的数据");
-
-        List<CtopOauthToken> tokens = tokenService.getToutiaoTokenByCreateTime(endDate);
-        if (null == tokens || tokens.size() <= 0) {
-            log.info("头条获取异步报表数据任务执行失败:未获取到可用的token");
-            return;
-        }
-
-        //1.创意 2.广告主 3.广告组 4.广告计划
-        for (CtopOauthToken token : tokens) {
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 1);
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 2);
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 3);
-            bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, 4);
-        }
-
-    }
-}

+ 0 - 47
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyCampaignReportAsyncJob.java

@@ -1,47 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 头条素材报表按天跑前一天的数据任务
- *
- * @author sunzhen
- */
-@Slf4j
-public class BytedanceDailyCampaignReportAsyncJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IBytedanceReportService bytedanceReportService;
-
-    @SneakyThrows
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        String date = DateUtils.formatDate(getDate);
-        log.info("头条异步广告组报表数据执行开始,跑的是" + date + "的数据");
-        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
-        if (null == tokens || tokens.size() <= 0) {
-            log.info("头条获取异步报表数据任务执行失败:未获取到可用的token");
-            return;
-        }
-
-        for (CtopOauthToken token : tokens) {
-            bytedanceReportService.bytedanceAsyncTaskCreate(date, date, token, 3);  //1.创意 2.广告主 3.广告组 4.广告计划
-        }
-
-    }
-}

+ 0 - 48
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyCreativeReportAsyncJob.java

@@ -1,48 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 头条素材报表按天跑前一天的数据任务
- *
- * @author sunzhen
- */
-@Slf4j
-public class BytedanceDailyCreativeReportAsyncJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IBytedanceReportService bytedanceReportService;
-
-    @SneakyThrows
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        String date = DateUtils.formatDate(getDate);
-        log.info("头条创意报表异步任务执行开始.跑的是" + date + "的数据");
-        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
-        if (null == tokens || tokens.size() <= 0) {
-            log.info("头条获取异步报表数据任务执行失败:未获取到可用的token");
-            return;
-        }
-
-        for (CtopOauthToken token : tokens) {
-            //1.创意 2.广告主 3.广告主 4.广告计划
-            bytedanceReportService.bytedanceAsyncTaskCreate(date, date, token, 1);
-        }
-
-    }
-}

+ 0 - 48
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyPlanReportAsyncJob.java

@@ -1,48 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 头条素材报表按天跑前一天的数据任务
- *
- * @author sunzhen
- */
-@Slf4j
-public class BytedanceDailyPlanReportAsyncJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IBytedanceReportService bytedanceReportService;
-
-    @SneakyThrows
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        String date = DateUtils.formatDate(getDate);
-        log.info("头条广告计划异步任务开始执行,跑的是" + date + "的数据");
-
-        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
-        if (null == tokens || tokens.size() <= 0) {
-            log.info("头条获取异步报表数据任务执行失败:未获取到可用的token");
-            return;
-        }
-
-        for (CtopOauthToken token : tokens) {
-            bytedanceReportService.bytedanceAsyncTaskCreate(date, date, token, 4);  //1.创意 2.广告主 3.广告组 4.广告计划
-        }
-
-    }
-}

+ 0 - 33
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyReportAsyncTaskGetJob.java

@@ -1,33 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
-import lombok.extern.slf4j.Slf4j;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * 头条素材报表按天跑前一天的数据任务
- *
- * @author sunzhen
- */
-@Slf4j
-public class BytedanceDailyReportAsyncTaskGetJob implements Job {
-    @Autowired
-    private IBytedanceReportService bytedanceReportService;
-
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        try {
-            log.info("头条获取素材报表数据定时任务执行开始");
-            Long starttime = System.currentTimeMillis();
-            bytedanceReportService.bytedanceAsyncTaskGet();
-            Long endtime = System.currentTimeMillis();
-            log.info("头条异步报表数据定时任务执行结束,执行耗时:{}秒", (endtime - starttime) / 1000);
-        } catch (Exception e) {
-            log.error("头条获取异步报表数据定时任务执行报错");
-            e.printStackTrace();
-        }
-    }
-}

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java

@@ -124,7 +124,7 @@ public class SysBaseApiImpl implements ISysBaseApi {
     }
 
     @Override
-    @Cacheable(cacheNames = CacheConstant.SYS_USERS_CACHE, key = "#username")
+//    @Cacheable(cacheNames = CacheConstant.SYS_USERS_CACHE, key = "#username")
     public LoginUser getUserByName(String username) {
         if (oConvertUtils.isEmpty(username)) {
             return null;

+ 0 - 165
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceDailyReportTaskController.java

@@ -1,165 +0,0 @@
-package cn.com.ctop.toutiao.modules.report.controller;
-
-import cn.com.ctop.common.module.annotation.AutoLog;
-import cn.com.ctop.common.module.utils.StringUtils;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceDailyReportTask;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceDailyReportTaskService;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.Arrays;
-
-/**
- * 头条异步报表任务表
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-04-16
- */
-@Slf4j
-@Api(tags="头条异步报表任务表")
-@RestController
-@RequestMapping("/bytedance/bytedanceDailyReportTask")
-public class BytedanceDailyReportTaskController {
-    @Autowired
-    private IBytedanceDailyReportTaskService bytedanceDailyReportTaskService;
-
-    /**
-     * 分页列表查询
-     *
-     * @param bytedanceDailyReportTask
-     * @param pageNo
-     * @param pageSize
-     * @param req
-     * @return
-     */
-    @AutoLog(value = "头条异步报表任务表-分页列表查询")
-    @ApiOperation(value = "头条异步报表任务表-分页列表查询", notes = "头条异步报表任务表-分页列表查询")
-    @GetMapping(value = "/list")
-    public Result<IPage<BytedanceDailyReportTask>> queryPageList(BytedanceDailyReportTask bytedanceDailyReportTask,
-                                                                 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                                 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                                                 HttpServletRequest req) {
-        Result<IPage<BytedanceDailyReportTask>> result = new Result<>();
-        QueryWrapper<BytedanceDailyReportTask> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceDailyReportTask, req.getParameterMap());
-        Page<BytedanceDailyReportTask> page = new Page<>(pageNo, pageSize);
-        IPage<BytedanceDailyReportTask> pageList = bytedanceDailyReportTaskService.page(page, queryWrapper);
-        result.setSuccess(true);
-        result.setResult(pageList);
-        return result;
-    }
-
-    /**
-     * 添加
-     *
-     * @param bytedanceDailyReportTask
-     * @return
-     */
-    @AutoLog(value = "头条异步报表任务表-添加")
-    @ApiOperation(value = "头条异步报表任务表-添加", notes = "头条异步报表任务表-添加")
-    @PostMapping(value = "/add")
-    public Result<BytedanceDailyReportTask> add(@RequestBody BytedanceDailyReportTask bytedanceDailyReportTask) {
-        Result<BytedanceDailyReportTask> result = new Result<>();
-        try {
-            bytedanceDailyReportTaskService.save(bytedanceDailyReportTask);
-            result.success("添加成功!");
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-            result.error500("操作失败");
-        }
-        return result;
-    }
-
-    /**
-     * 编辑
-     *
-     * @param bytedanceDailyReportTask
-     * @return
-     */
-    @AutoLog(value = "头条异步报表任务表-编辑")
-    @ApiOperation(value = "头条异步报表任务表-编辑", notes = "头条异步报表任务表-编辑")
-    @PutMapping(value = "/edit")
-    public Result<BytedanceDailyReportTask> edit(@RequestBody BytedanceDailyReportTask bytedanceDailyReportTask) {
-        Result<BytedanceDailyReportTask> result = new Result<>();
-        BytedanceDailyReportTask bytedanceDailyReportTaskEntity = bytedanceDailyReportTaskService.getById(bytedanceDailyReportTask.getId());
-        if (bytedanceDailyReportTaskEntity == null) {
-            result.error500("未找到对应实体");
-        } else {
-            boolean ok = bytedanceDailyReportTaskService.updateById(bytedanceDailyReportTask);
-            if (ok) {
-                result.success("修改成功!");
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * 通过id删除
-     *
-     * @param id
-     * @return
-     */
-    @AutoLog(value = "头条异步报表任务表-通过id删除")
-    @ApiOperation(value = "头条异步报表任务表-通过id删除", notes = "头条异步报表任务表-通过id删除")
-    @DeleteMapping(value = "/delete")
-    public Result<Object> delete(@RequestParam(name = "id", required = true) String id) {
-        try {
-            bytedanceDailyReportTaskService.removeById(id);
-        } catch (Exception e) {
-            log.error("删除失败", e.getMessage());
-            return Result.error("删除失败!");
-        }
-        return Result.ok("删除成功!");
-    }
-
-    /**
-     * 批量删除
-     *
-     * @param ids
-     * @return
-     */
-    @AutoLog(value = "头条异步报表任务表-批量删除")
-    @ApiOperation(value = "头条异步报表任务表-批量删除", notes = "头条异步报表任务表-批量删除")
-    @DeleteMapping(value = "/deleteBatch")
-    public Result<BytedanceDailyReportTask> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
-        Result<BytedanceDailyReportTask> result = new Result<>();
-        if (ids == null || "".equals(ids.trim())) {
-            result.error500("参数不识别!");
-        } else {
-            this.bytedanceDailyReportTaskService.removeByIds(Arrays.asList(ids.split(StringUtils.COMMA)));
-            result.success("删除成功!");
-        }
-        return result;
-    }
-
-    /**
-     * 通过id查询
-     *
-     * @param id
-     * @return
-     */
-    @AutoLog(value = "头条异步报表任务表-通过id查询")
-    @ApiOperation(value = "头条异步报表任务表-通过id查询", notes = "头条异步报表任务表-通过id查询")
-    @GetMapping(value = "/queryById")
-    public Result<BytedanceDailyReportTask> queryById(@RequestParam(name = "id", required = true) String id) {
-        Result<BytedanceDailyReportTask> result = new Result<>();
-        BytedanceDailyReportTask bytedanceDailyReportTask = bytedanceDailyReportTaskService.getById(id);
-        if (bytedanceDailyReportTask == null) {
-            result.error500("未找到对应实体");
-        } else {
-            result.setResult(bytedanceDailyReportTask);
-            result.setSuccess(true);
-        }
-        return result;
-    }
-}

+ 0 - 52
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportController.java

@@ -57,15 +57,12 @@ public class BytedanceReportController {
             e.printStackTrace();
             result.setSuccess(false);
         }
-
         return result;
-
     }
 
 
     @PostMapping("/kuaiShou/accountDetailReport")
     public Result<List<JSONObject>> getKuaiShouAccountDetailReport(@RequestBody JSONObject requestJson) {
-
         Result<List<JSONObject>> result = new Result<>();
         try {
             List<JSONObject> kuaiShouAccounDetailtReport = bytedanceReportService.getKuaiShouAccounDetailtReport(requestJson);
@@ -75,15 +72,12 @@ public class BytedanceReportController {
             e.printStackTrace();
             result.setSuccess(false);
         }
-
         return result;
-
     }
 
 
     @PostMapping("/kuaiShou/getReportList")
     public Result<List<JSONObject>> getReportList(@RequestBody JSONObject requestJson) {
-
         Result<List<JSONObject>> result = new Result<>();
         try {
             List<JSONObject> kuaiShouAccounDetailtReport = bytedanceReportService.getReportList(requestJson);
@@ -92,55 +86,9 @@ public class BytedanceReportController {
         } catch (Exception e) {
             e.printStackTrace();
             result.setSuccess(false);
-
-        }
-        return result;
-
-    }
-
-    @PostMapping("/bytedance/async")
-    public Result<List<JSONObject>> asyncTaskCreate(@RequestParam(name = "startDate")String startDate,
-                                                    @RequestParam(name = "endDate")String endDate,
-                                                    @RequestParam(name = "type")Integer type) {
-
-        Result<List<JSONObject>> result = new Result<>();
-        try {
-            log.info("头条获取异步报表数据任务执行开始");
-            Long starttime = System.currentTimeMillis();
-            List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
-            if (null == tokens || tokens.size() <= 0) {
-                log.info("头条获取异步报表数据任务执行失败:未获取到可用的token");
-                return result;
-            }
-
-            for (CtopOauthToken token : tokens) {
-                bytedanceReportService.bytedanceAsyncTaskCreate(startDate, endDate, token, type);
-            }
-            Long endtime = System.currentTimeMillis();
-            log.info("头条异步报表数据任务执行结束,执行耗时:{}秒", (endtime - starttime) / 1000);
-        } catch (Exception e) {
-            log.error("头条获取异步报表数据任务执行报错");
-            e.printStackTrace();
-            result.setSuccess(false);
         }
         return result;
-    }
 
-    @PostMapping("/bytedance/async/taskGet")
-    public Result<List<JSONObject>> bytedanceAsyncTaskGet(@RequestBody JSONObject requestJson) {
-        Result<List<JSONObject>> result = new Result<>();
-        try {
-            log.info("头条下载异步报表数据定时任务执行开始");
-            Long starttime = System.currentTimeMillis();
-            bytedanceReportService.bytedanceAsyncTaskGet();
-            Long endtime = System.currentTimeMillis();
-            log.info("头条下载异步报表数据定时任务执行结束,执行耗时:{}秒", (endtime - starttime) / 1000);
-        } catch (Exception e) {
-            log.error("头条下载异步报表数据定时任务执行报错");
-            e.printStackTrace();
-            result.setSuccess(false);
-        }
-        return result;
     }
 
     @GetMapping("/bytedance/bytedanceMaterialReport")

+ 0 - 22
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceDailyReportTaskMapper.java

@@ -1,22 +0,0 @@
-package cn.com.ctop.toutiao.modules.report.mapper;
-
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceDailyReportTask;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * 头条异步报表任务表
- * @author: jeecg-boot
- * @date:   2020-04-16
- * @cersion: V1.0
- */
-public interface BytedanceDailyReportTaskMapper extends BaseMapper<BytedanceDailyReportTask> {
-
-    void loadBytedanceDailyCreativeFileAsync(@Param("localPath") String localPath);
-
-    void loadBytedanceDailyAccountFileAsync(@Param("localPath") String localPath);
-
-    void loadBytedanceDailyCampaignFileAsync(@Param("localPath") String localPath);
-
-    void loadBytedanceDailyPlanFileAsync(@Param("localPath") String localPath);
-}

+ 0 - 112
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceDailyReportTaskMapper.xml

@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="cn.com.ctop.toutiao.modules.report.mapper.BytedanceDailyReportTaskMapper">
-
-    <insert id="loadBytedanceDailyCreativeFileAsync">
-		LOAD DATA local INFILE  #{localPath}
-		REPLACE INTO TABLE ctop_bytedance_report_creative_daily_async CHARACTER SET utf8mb4
-		FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
-		IGNORE 1 LINES
-		(
-		campaign_id,
-        deep_convert_rate,
-        ad_id,
-        ctr,
-        show_material,
-        avg_show_cost,
-        creative_id,
-        convert_cost,
-        convert_material,
-        deep_convert_cost,
-        account_id,
-        cost,
-        deep_convert,
-        avg_click_cost,
-        ad_name,
-        campaign_name,
-        convert_rate,
-        creative_material_mode,
-        click,
-        stat_datetime
-        )
-    </insert>
-
-    <insert id="loadBytedanceDailyAccountFileAsync">
-        LOAD DATA local INFILE  #{localPath}
-        REPLACE INTO TABLE ctop_bytedance_report_account_daily_async CHARACTER SET utf8mb4
-        FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
-        IGNORE 1 LINES
-        (
-            deep_convert_rate,
-            pricing_category,
-            ctr,
-            show_material,
-            avg_show_cost,
-            convert_rate,
-            convert_cost,
-            convert_material,
-            deep_convert_cost,
-            account_id,
-            cost,
-            deep_convert,
-            avg_click_cost,
-            click,
-            stat_datetime
-        )
-    </insert>
-
-    <insert id="loadBytedanceDailyCampaignFileAsync">
-        LOAD DATA local INFILE  #{localPath}
-        REPLACE INTO TABLE ctop_bytedance_report_campaign_daily_async CHARACTER SET utf8mb4
-        FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
-        IGNORE 1 LINES
-        (
-            campaign_type,
-            deep_convert_rate,
-            ctr,
-            show_material,
-            avg_show_cost,
-            convert_rate,
-            convert_cost,
-            campaign_id,
-            deep_convert_cost,
-            account_id,
-            cost,
-            deep_convert,
-            avg_click_cost,
-            campaign_name,
-            convert_material,
-            click,
-            stat_datetime
-        )
-    </insert>
-
-    <insert id="loadBytedanceDailyPlanFileAsync">
-        LOAD DATA local INFILE  #{localPath}
-        REPLACE INTO TABLE ctop_bytedance_report_plan_daily_async CHARACTER SET utf8mb4
-        FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
-        IGNORE 1 LINES
-        (
-            landing_type,
-            deep_convert_rate,
-            ad_id,
-            ctr,
-            show_material,
-            avg_show_cost,
-            convert_rate,
-            convert_cost,
-            convert_material,
-            deep_convert_cost,
-            account_id,
-            cost,
-            deep_convert,
-            avg_click_cost,
-            ad_name,
-            campaign_name,
-            click,
-            stat_datetime,
-            campaign_id
-        )
-    </insert>
-
-</mapper>

+ 0 - 14
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceDailyReportTaskService.java

@@ -1,14 +0,0 @@
-package cn.com.ctop.toutiao.modules.report.service;
-
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceDailyReportTask;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
- * 头条异步报表任务表
- * @author jeecg-boot
- * @date   2020-04-16
- * @version V1.0
- */
-public interface IBytedanceDailyReportTaskService extends IService<BytedanceDailyReportTask> {
-
-}

+ 0 - 6
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceReportService.java

@@ -23,8 +23,6 @@ public interface IBytedanceReportService {
      * @return
      */
     List<JSONObject> getKuaiShouAccounDetailtReport(JSONObject requestJson);
-
-
     /**
      * 明细列表
      *
@@ -33,10 +31,6 @@ public interface IBytedanceReportService {
      */
     List<JSONObject> getReportList(JSONObject requestJson);
 
-    void bytedanceAsyncTaskCreate(String startDate, String endDate, CtopOauthToken token, Integer type);
-
-    void bytedanceAsyncTaskGet();
-
     int bytedanceMaterialReport(CtopOauthToken token, String startDate, String endDate);
 
     int bytedanceMaterialReportRetry(Integer type, CtopOauthToken token, String startDate, String endDate);

+ 0 - 21
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceDailyReportTaskServiceImpl.java

@@ -1,21 +0,0 @@
-package cn.com.ctop.toutiao.modules.report.service.impl;
-
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceDailyReportTask;
-import cn.com.ctop.toutiao.modules.report.mapper.BytedanceDailyReportTaskMapper;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceDailyReportTaskService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.context.annotation.Primary;
-import org.springframework.stereotype.Service;
-
-/**
- * 头条异步报表任务表
- * @author jeecg-boot
- * @date   2020-04-16
- * @version V1.0
- */
-@Service
-@Primary
-
-public class BytedanceDailyReportTaskServiceImpl extends ServiceImpl<BytedanceDailyReportTaskMapper, BytedanceDailyReportTask> implements IBytedanceDailyReportTaskService {
-
-}

+ 0 - 240
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java

@@ -1,30 +1,20 @@
 package cn.com.ctop.toutiao.modules.report.service.impl;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.mapper.UserAllocationMapper;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.HttpUtils;
-import cn.com.ctop.common.module.utils.LoadFileUtil;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceDailyReportTask;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialDaily;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialRetry;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportVideoMaterialDaily;
-import cn.com.ctop.toutiao.modules.report.mapper.BytedanceAdvertiserDailyReportMapper;
-import cn.com.ctop.toutiao.modules.report.mapper.BytedanceDailyReportTaskMapper;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMapper;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialDailyMapper;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceDailyReportTaskService;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -36,31 +26,11 @@ import java.util.Map;
 
 @Service
 @Slf4j
-@Primary
-
 public class BytedanceReportServiceImpl implements IBytedanceReportService {
-
     @Value("${jeecg.path.report-history}")
     private String downloadPath;
     @Autowired
-    private UserAllocationMapper userAllocationMapper;
-
-    @Autowired
-    private BytedanceAdvertiserDailyReportMapper bytedanceAdvertiserDailyReportMapper;
-
-    @Autowired
     private BytedanceReportMapper reportMapper;
-
-
-    @Autowired
-    private BytedanceDailyReportTaskMapper bytedanceDailyReportTaskMapper;
-
-    @Autowired
-    private IBytedanceDailyReportTaskService bytedanceDailyReportTaskService;
-
-    @Autowired
-    private ICtopOauthTokenService ctopOauthTokenService;
-
     @Autowired
     private BytedanceReportMaterialDailyMapper bytedanceReportMaterialDailyMapper;
 
@@ -498,216 +468,6 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
         return reportList;
     }
 
-    /////////////////////////////////////////////////////////////////////////////////////////////////
-    //创建异步任务
-    @Override
-    public void bytedanceAsyncTaskCreate(String startDate, String endDate, CtopOauthToken token, Integer type) {
-        int diffMonths = DateUtils.calDiffMonth(DateUtils.parseDate(startDate, "yyyy-MM-dd"), DateUtils.parseDate(endDate, "yyyy-MM-dd"));
-        if (diffMonths == 0) {
-            bytedanceAsyncTaskCreateByMonth(startDate, endDate, token, type);
-        } else {
-            for (int i = 0; i <= diffMonths; i++) {
-                if (i == 0) {
-                    Map<String, String> dateMap = DateUtils.getMaxMinDaysOfAddMonth(startDate, "yyyy-MM-dd", i);
-                    String end = dateMap.get("endDate");
-                    bytedanceAsyncTaskCreateByMonth(startDate, end, token, type);
-                } else if (i == diffMonths) {
-                    Map<String, String> dateMap = DateUtils.getMaxMinDaysOfAddMonth(startDate, "yyyy-MM-dd", i);
-                    String start = dateMap.get("startDate");
-                    bytedanceAsyncTaskCreateByMonth(start, endDate, token, type);
-                } else {
-                    Map<String, String> dateMap = DateUtils.getMaxMinDaysOfAddMonth(startDate, "yyyy-MM-dd", i);
-                    String start = dateMap.get("startDate");
-                    String end = dateMap.get("endDate");
-                    bytedanceAsyncTaskCreateByMonth(start, end, token, type);
-                }
-            }
-        }
-    }
-
-    /***
-     * 由于异步拉取数据不能跨月,故只能按月循环拉取
-     * @param startDate
-     * @param endDate
-     * @param token
-     */
-    private void bytedanceAsyncTaskCreateByMonth(String startDate, String endDate, CtopOauthToken token, Integer type) {
-        String access_token = token.getAccessToken();
-        Long accountId = token.getAccountId();
-
-        // 请求地址
-        String open_api_domain = "https://ad.toutiao.com";
-        String path = "/open_api/2/async_task/create/";
-
-        String taskName = System.currentTimeMillis() + "";
-        // 请求参数
-        final Map filtering = new HashMap() {
-            {
-                put("start_date", startDate);
-                put("end_date", endDate);
-                if (type == 1) {//创意
-                    put("group_by", new String[]{"STAT_GROUP_BY_CREATIVE_ID", "STAT_GROUP_BY_TIME_DAY", "STAT_GROUP_BY_CREATIVE_MATERIAL_MODE"});   //按照创意分组、天分组、创意类型分组查询
-                } else if (type == 2) {//广告主
-                    put("group_by", new String[]{"STAT_GROUP_BY_ADVERTISER_ID", "STAT_GROUP_BY_TIME_DAY", "STAT_GROUP_BY_PRICING_CATEGORY"});   //按照广告主分组、天分组、广告类型类型分组查询
-                } else if (type == 3) {//广告组
-                    put("group_by", new String[]{"STAT_GROUP_BY_CAMPAIGN_ID", "STAT_GROUP_BY_TIME_DAY", "STAT_GROUP_BY_CAMPAIGN_TYPE"});  //按照广告组、天、广告组类型分组
-                } else {//4广告计划
-                    put("group_by", new String[]{"STAT_GROUP_BY_AD_ID", "STAT_GROUP_BY_TIME_DAY", "STAT_GROUP_BY_LANDING_TYPE"});  //按照广告计划、天、推广类型分组
-                }
-            }
-        };
-        final Map data = new HashMap() {
-            {
-                put("advertiser_id", accountId);
-                put("task_name", taskName);
-                put("task_type", "REPORT");
-                put("task_params", filtering);
-            }
-        };
-
-        JSONObject json = HttpUtils.bytedancePostRequest(access_token, open_api_domain + path, JSONObject.parseObject(JSONObject.toJSONString(data)));
-        if (json == null) {
-            log.error("请求有误:" + JSONObject.toJSONString(data));
-        }
-
-        String jsonString = JSON.toJSONString(json);
-
-        if (!Check.isNull(json)) {
-            Integer code = json.getInteger("code");
-            if (code != 0) {
-                log.error("返回信息错误,错误码为:" + code + ",头条accountId:" + accountId + ",message:" + json.getString("message"));
-                return;
-            }
-            JSONObject dataJson = json.getJSONObject("data");
-
-            //解析数据并入库
-            BytedanceDailyReportTask task = new BytedanceDailyReportTask();
-            task.setAccountId(accountId);
-            task.setTaskCreateTime(dataJson.getDate("create_time") == null ? null : dataJson.getDate("create_time"));
-            task.setTaskId(dataJson.getLong("task_id") == null ? null : dataJson.getLong("task_id"));
-            task.setTaskName(dataJson.getString("task_name") == null ? null : dataJson.getString("task_name"));
-            task.setTaskParams(JSON.toJSONString(dataJson.getJSONObject("task_params")));
-            task.setJson(jsonString);
-            task.setTaskStatus(dataJson.getString("task_status"));
-            task.setTaskType(dataJson.getString("task_type"));
-            task.setType(type);
-            task.setIsDownload(0);
-            task.setStatus(1); //状态1正常 0废弃
-            bytedanceDailyReportTaskMapper.insert(task);
-        }
-    }
-
-    //获取任务列表
-    @Override
-    public void bytedanceAsyncTaskGet() {
-        QueryWrapper<BytedanceDailyReportTask> taskQueryWrapper = new QueryWrapper<>();
-        //查询三种状态的信息--任务已创建、任务执行中、任务处理中
-        taskQueryWrapper.eq("is_download", 0);
-        //taskQueryWrapper.in("task_status", "ASYNC_TASK_STATUS_CREATED","ASYNC_TASK_STATUS_EXECUTING","ASYNC_TASK_STATUS_EXECUTING_STAGE2");
-        taskQueryWrapper.notIn("task_status", "ASYNC_TASK_STATUS_FAILED");
-        taskQueryWrapper.orderByDesc("create_time");
-        List<BytedanceDailyReportTask> taskList = bytedanceDailyReportTaskService.list(taskQueryWrapper);
-
-        if (!Check.isNull(taskList)) {
-            for (BytedanceDailyReportTask task : taskList) {
-                CtopOauthToken token = ctopOauthTokenService.getTokenByAccountId(task.getAccountId());
-
-                if (!Check.isNull(token)) {
-                    // 请求地址
-                    String open_api_domain = "https://ad.toutiao.com";
-                    String path = "/open_api/2/async_task/get/";
-
-                    String access_token = token.getAccessToken();
-                    Long accountId = task.getAccountId();
-                    final Long advertiser_id = accountId;
-
-                    // 请求参数
-                    final Map filtering = new HashMap() {
-                        {
-                            put("task_ids", new Long[]{task.getTaskId()});
-                            put("task_name", task.getTaskName());
-                        }
-                    };
-                    Map data = new HashMap() {
-                        {
-                            put("advertiser_id", advertiser_id);
-                            put("filtering", filtering);
-                        }
-                    };
-
-                    JSONObject json = HttpUtils.bytedanceGetRequest(access_token, open_api_domain + path, JSONObject.parseObject(JSONObject.toJSONString(data)));
-                    if (json == null) {
-                        log.error("请求有误:" + JSONObject.toJSONString(data));
-                    }
-
-                    try {
-                        String jsonString = JSON.toJSONString(json);
-                        //log.info("返回json为" + jsonString);
-
-                        if (!Check.isNull(json)) {
-                            Integer code = json.getInteger("code");
-                            if (code != 0) {
-                                log.info("获取任务列表返回信息错误,错误码为:" + code + ",头条accountId:" + accountId + "taskId:" + task.getTaskId());
-                                continue;
-                            }
-
-                            JSONObject jsonData = json.getJSONObject("data");
-                            if (Check.isNull(jsonData)) {
-                                log.error("获取任务列表返回信息data内容为空");
-                            }
-                            JSONArray jsonArrayay = jsonData.getJSONArray("list");
-
-                            for (int i = 0; i < jsonArrayay.size(); i++) {
-                                JSONObject detailJson = jsonArrayay.getJSONObject(i);
-                                if (!Check.isNull(detailJson)) {
-                                    String taskStatus = detailJson.getString("task_status");
-
-                                    if ("ASYNC_TASK_STATUS_COMPLETED".equals(taskStatus)) {
-                                        bytedanceAsyncTaskDownload(task, token, task.getType());
-                                        task.setIsDownload(1);
-                                    }
-                                    task.setTaskStatus(taskStatus);
-                                    bytedanceDailyReportTaskMapper.updateById(task);
-                                }
-                            }
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-            }
-        }
-    }
-
-    //下载任务结果   type 1.creative 2.account 3.campaign 4.plan
-    private void bytedanceAsyncTaskDownload(BytedanceDailyReportTask task, CtopOauthToken token, Integer type) {
-        // 请求地址
-        String open_api_domain = "https://ad.toutiao.com";
-        String path = "/open_api/2/async_task/download/";
-
-        String url = open_api_domain + path;
-        String fileName = task.getAccountId() + "_" + "type" + type + "_" + task.getTaskId() + "_" + System.currentTimeMillis() + ".csv";
-        Map<String, Object> requestMap = new HashMap<>();
-        requestMap.put("advertiser_id", task.getAccountId());
-        requestMap.put("task_id", task.getTaskId());
-        String localPath = LoadFileUtil.downloadByUrl(requestMap, downloadPath, url, token.getAccessToken(), fileName);
-        if (type == 1) {
-            //素材异步报表
-            bytedanceDailyReportTaskMapper.loadBytedanceDailyCreativeFileAsync(localPath);
-        } else if (type == 2) {
-            //账户异步报表
-            bytedanceDailyReportTaskMapper.loadBytedanceDailyAccountFileAsync(localPath);
-        } else if (type == 3) {
-            //campaign异步报表
-            bytedanceDailyReportTaskMapper.loadBytedanceDailyCampaignFileAsync(localPath);
-        } else if (type == 4) {
-            //plan异步报表
-            bytedanceDailyReportTaskMapper.loadBytedanceDailyPlanFileAsync(localPath);
-        } else {
-            log.error("异步报表类型传入错误,task_id:" + task.getTaskId() + ";类型:" + type);
-        }
-    }
-
     /////////////////////////////////////////////////////////\
     //素材报表
     @Override