Forráskód Böngészése

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

zhaoxian 4 éve
szülő
commit
8e006f5f33
36 módosított fájl, 1241 hozzáadás és 40 törlés
  1. 150 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceMusicInfoController.java
  2. 140 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceMusicTypeController.java
  3. 156 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/DictMusicTypeController.java
  4. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectMemberController.java
  5. 2 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IProjectMemberService.java
  6. 27 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ProjectMemberServiceImpl.java
  7. 51 15
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  8. 0 3
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MusicTypeServiceImpl.java
  9. 74 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/BytedanceMusicInfo.java
  10. 66 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/BytedanceMusicType.java
  11. 41 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/DictMusicType.java
  12. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/BytedanceMusicInfoMapper.java
  13. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/BytedanceMusicTypeMapper.java
  14. 18 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/DictMusicTypeMapper.java
  15. 5 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/BytedanceMusicInfoMapper.xml
  16. 5 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/BytedanceMusicTypeMapper.xml
  17. 13 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/DictMusicTypeMapper.xml
  18. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IBytedanceMusicInfoService.java
  19. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IBytedanceMusicTypeService.java
  20. 16 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IDictMusicTypeService.java
  21. 18 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/BytedanceMusicInfoServiceImpl.java
  22. 18 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/BytedanceMusicTypeServiceImpl.java
  23. 28 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/DictMusicTypeServiceImpl.java
  24. 25 15
      module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceDailyMaterialReportJob.java
  25. 93 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouVideoGetController.java
  26. 116 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/vo/KuaiShouVideoGetVo.java
  27. 3 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouReportDailyMaterialMapper.java
  28. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouVideoGetMapper.java
  29. 42 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml
  30. 27 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml
  31. 3 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouReportDailyMaterialService.java
  32. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouVideoGetService.java
  33. 11 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouReportDailyMaterialServiceImpl.java
  34. 6 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouVideoGetServiceImpl.java
  35. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java
  36. 0 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceAccountReportMapper.java

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

@@ -0,0 +1,150 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicInfo;
+import cn.com.ctop.crawler.modules.music.service.IBytedanceMusicInfoService;
+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
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Slf4j
+@Api(tags="音乐信息")
+@RestController
+@RequestMapping("/ctop/bytedanceMusicInfo")
+public class BytedanceMusicInfoController {
+	@Autowired
+	private IBytedanceMusicInfoService bytedanceMusicInfoService;
+
+	/**
+	  * 分页列表查询
+	 * @param bytedanceMusicInfo
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@ApiOperation(value="音乐信息-分页列表查询", notes="音乐信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<BytedanceMusicInfo>> queryPageList(BytedanceMusicInfo bytedanceMusicInfo,
+														   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+														   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+														   HttpServletRequest req) {
+		Result<IPage<BytedanceMusicInfo>> result = new Result<>();
+		QueryWrapper<BytedanceMusicInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceMusicInfo, req.getParameterMap());
+		Page<BytedanceMusicInfo> page = new Page<>(pageNo, pageSize);
+		IPage<BytedanceMusicInfo> pageList = bytedanceMusicInfoService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+
+	/**
+	  *   添加
+	 * @param bytedanceMusicInfo
+	 * @return
+	 */
+	@ApiOperation(value="音乐信息-添加", notes="音乐信息-添加")
+	@PostMapping(value = "/add")
+	public Result<BytedanceMusicInfo> add(@RequestBody BytedanceMusicInfo bytedanceMusicInfo) {
+		Result<BytedanceMusicInfo> result = new Result<>();
+		try {
+			bytedanceMusicInfoService.save(bytedanceMusicInfo);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+
+	/**
+	  *  编辑
+	 * @param bytedanceMusicInfo
+	 * @return
+	 */
+	@ApiOperation(value="音乐信息-编辑", notes="音乐信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<BytedanceMusicInfo> edit(@RequestBody BytedanceMusicInfo bytedanceMusicInfo) {
+		Result<BytedanceMusicInfo> result = new Result<BytedanceMusicInfo>();
+		BytedanceMusicInfo bytedanceMusicInfoEntity = bytedanceMusicInfoService.getById(bytedanceMusicInfo.getId());
+		if(bytedanceMusicInfoEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = bytedanceMusicInfoService.updateById(bytedanceMusicInfo);
+			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 {
+			bytedanceMusicInfoService.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<BytedanceMusicInfo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<BytedanceMusicInfo> result = new Result<>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.bytedanceMusicInfoService.removeByIds(Arrays.asList(ids.split(",")));
+			result.success("删除成功!");
+		}
+		return result;
+	}
+
+	/**
+	  * 通过id查询
+	 * @param id
+	 * @return
+	 */
+	@ApiOperation(value="音乐信息-通过id查询", notes="音乐信息-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<BytedanceMusicInfo> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<BytedanceMusicInfo> result = new Result<>();
+		BytedanceMusicInfo bytedanceMusicInfo = bytedanceMusicInfoService.getById(id);
+		if(bytedanceMusicInfo==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(bytedanceMusicInfo);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+}

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

@@ -0,0 +1,140 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicType;
+import cn.com.ctop.crawler.modules.music.service.IBytedanceMusicTypeService;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ctop/bytedanceMusicType")
+public class BytedanceMusicTypeController {
+	@Autowired
+	private IBytedanceMusicTypeService bytedanceMusicTypeService;
+
+	/**
+	  * 分页列表查询
+	 * @param bytedanceMusicType
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@GetMapping(value = "/list")
+	public Result<IPage<BytedanceMusicType>> queryPageList(BytedanceMusicType bytedanceMusicType,
+														   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+														   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+														   HttpServletRequest req) {
+		Result<IPage<BytedanceMusicType>> result = new Result<>();
+		QueryWrapper<BytedanceMusicType> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceMusicType, req.getParameterMap());
+		Page<BytedanceMusicType> page = new Page<>(pageNo, pageSize);
+		IPage<BytedanceMusicType> pageList = bytedanceMusicTypeService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+
+	/**
+	  *   添加
+	 * @param bytedanceMusicType
+	 * @return
+	 */
+	@PostMapping(value = "/add")
+	public Result<BytedanceMusicType> add(@RequestBody BytedanceMusicType bytedanceMusicType) {
+		Result<BytedanceMusicType> result = new Result<>();
+		try {
+			bytedanceMusicTypeService.save(bytedanceMusicType);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+
+	/**
+	  *  编辑
+	 * @param bytedanceMusicType
+	 * @return
+	 */
+	@PutMapping(value = "/edit")
+	public Result<BytedanceMusicType> edit(@RequestBody BytedanceMusicType bytedanceMusicType) {
+		Result<BytedanceMusicType> result = new Result<BytedanceMusicType>();
+		BytedanceMusicType bytedanceMusicTypeEntity = bytedanceMusicTypeService.getById(bytedanceMusicType.getId());
+		if(bytedanceMusicTypeEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = bytedanceMusicTypeService.updateById(bytedanceMusicType);
+			if(ok) {
+				result.success("修改成功!");
+			}
+		}
+		return result;
+	}
+
+	/**
+	  *   通过id删除
+	 * @param id
+	 * @return
+	 */
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		try {
+			bytedanceMusicTypeService.removeById(id);
+		} catch (Exception e) {
+			log.error("删除失败",e.getMessage());
+			return Result.error("删除失败!");
+		}
+		return Result.ok("删除成功!");
+	}
+
+	/**
+	  *  批量删除
+	 * @param ids
+	 * @return
+	 */
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<BytedanceMusicType> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<BytedanceMusicType> result = new Result<>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.bytedanceMusicTypeService.removeByIds(Arrays.asList(ids.split(",")));
+			result.success("删除成功!");
+		}
+		return result;
+	}
+
+	/**
+	  * 通过id查询
+	 * @param id
+	 * @return
+	 */
+	@GetMapping(value = "/queryById")
+	public Result<BytedanceMusicType> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<BytedanceMusicType> result = new Result<>();
+		BytedanceMusicType bytedanceMusicType = bytedanceMusicTypeService.getById(id);
+		if(bytedanceMusicType==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(bytedanceMusicType);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+}

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

@@ -0,0 +1,156 @@
+package org.jeecg.modules.ctop.controller;
+
+import cn.com.ctop.crawler.modules.music.entity.DictMusicType;
+import cn.com.ctop.crawler.modules.music.service.IDictMusicTypeService;
+import com.alibaba.fastjson.JSONObject;
+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
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Slf4j
+@Api(tags="抖音音乐类型")
+@RestController
+@RequestMapping("/ctop/dictMusicType")
+public class DictMusicTypeController {
+	@Autowired
+	private IDictMusicTypeService dictMusicTypeService;
+
+	/**
+	  * 分页列表查询
+	 * @param dictMusicType
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@GetMapping(value = "/list")
+	public Result<IPage<DictMusicType>> queryPageList(DictMusicType dictMusicType,
+													  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+													  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+													  HttpServletRequest req) {
+		Result<IPage<DictMusicType>> result = new Result<>();
+		QueryWrapper<DictMusicType> queryWrapper = QueryGenerator.initQueryWrapper(dictMusicType, req.getParameterMap());
+		Page<DictMusicType> page = new Page<>(pageNo, pageSize);
+		IPage<DictMusicType> pageList = dictMusicTypeService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+
+
+
+	/**
+	  *   添加
+	 * @param dict_music_type
+	 * @return
+	 */
+	@PostMapping(value = "/add")
+	public Result<DictMusicType> add(@RequestBody DictMusicType dictMusicType) {
+		Result<DictMusicType> result = new Result<>();
+		try {
+			dictMusicTypeService.save(dictMusicType);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+
+	/**
+	  *  编辑
+	 * @param dictMusicType
+	 * @return
+	 */
+	@ApiOperation(value="抖音音乐类型-编辑", notes="抖音音乐类型-编辑")
+	@PutMapping(value = "/edit")
+	public Result<DictMusicType> edit(@RequestBody DictMusicType dictMusicType) {
+		Result<DictMusicType> result = new Result<>();
+		DictMusicType dictMusicTypeEntity = dictMusicTypeService.getById(dictMusicType.getId());
+		if(dictMusicTypeEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = dictMusicTypeService.updateById(dictMusicType);
+			if(ok) {
+				result.success("修改成功!");
+			}
+		}
+
+		return result;
+	}
+
+	@PostMapping("listAll")
+	public JSONObject listAllType(){
+		return dictMusicTypeService.listAll();
+	}
+
+	/**
+	  *   通过id删除
+	 * @param id
+	 * @return
+	 */
+	@ApiOperation(value="抖音音乐类型-通过id删除", notes="抖音音乐类型-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		try {
+			dictMusicTypeService.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<DictMusicType> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<DictMusicType> result = new Result<>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.dictMusicTypeService.removeByIds(Arrays.asList(ids.split(",")));
+			result.success("删除成功!");
+		}
+		return result;
+	}
+
+	/**
+	  * 通过id查询
+	 * @param id
+	 * @return
+	 */
+	@ApiOperation(value="抖音音乐类型-通过id查询", notes="抖音音乐类型-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<DictMusicType> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<DictMusicType> result = new Result<>();
+		DictMusicType dictMusicType = dictMusicTypeService.getById(id);
+		if(dictMusicType==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(dictMusicType);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+}

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

@@ -511,6 +511,25 @@ public class ProjectMemberController {
         return resultBody;
     }
 
+    /**
+     * 查询当前账户下的快手头条传不同的mediaType
+     *
+     * @return
+     */
+    @GetMapping("/getAllProjectAccount")
+    public Result<List<Map<String, Object>>> getAllProjectAccount(String mediaType) {
+        Result<List<Map<String, Object>>> resultBody = new Result<>();
+        try {
+            List<Map<String, Object>> result = projectMemberService.getAllProjectAccount(mediaType);
+            resultBody.setSuccess(true);
+            resultBody.setResult(result);
+        } catch (Exception e) {
+            resultBody.setSuccess(false);
+            resultBody.success("查询失败");
+        }
+        return resultBody;
+    }
+
 
     /**
      * 销售的项目

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IProjectMemberService.java

@@ -39,4 +39,6 @@ public interface IProjectMemberService extends IService<ProjectMember> {
     List<Long> getProjectByAccountIds(JSONArray accountIds);
 
     List<JSONObject> getProjectByUserIdAndMediaIds(String userId, List<Integer> mediaIds);
+
+    List<Map<String, Object>> getAllProjectAccount(String mediaType);
 }

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ProjectMemberServiceImpl.java

@@ -201,6 +201,7 @@ public class ProjectMemberServiceImpl extends ServiceImpl<ProjectMemberMapper, P
         return memberMapper.getProjectByUserId(userId);
     }
 
+    @Override
     public List<Long> getProjectByAccountIds(JSONArray accountIds) {
         return memberMapper.getProjectByAccountIds(accountIds);
     }
@@ -234,5 +235,31 @@ public class ProjectMemberServiceImpl extends ServiceImpl<ProjectMemberMapper, P
         return memberMapper.getProjectByUserIdAndMediaIds(userId, mediaIds);
     }
 
+    @Override
+    public List<Map<String, Object>> getAllProjectAccount(String mediaType) {
+        List<Map<String, Object>> result = new ArrayList<>();
+        List<Integer> mediaList = new ArrayList<>();
+        if (mediaType.equals(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE)) {
+            mediaList.add(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT);
+            mediaList.add(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INSIDE_INT);
+        } else if (mediaType.equals(CtopAdConstant.PLATFORM_TYPE_KUAISHOU)) {
+            mediaList.add(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT);
+            mediaList.add(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INSIDE_INT);
+        }
+
+        //查询登录账号下的项目
+        List<ProjectMember> projectMemberList = this.memberMapper.adminProjects(mediaList);
+        if (projectMemberList.isEmpty()) {
+            return result;
+        }
+        projectMemberList.forEach(ProjectMember -> {
+            Map<String, Object> temp = this.queryAccountByProjectId(ProjectMember);
+            if (temp != null) {
+                result.add(temp);
+            }
+        });
+        return result;
+    }
+
 
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 51 - 15
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java


+ 0 - 3
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MusicTypeServiceImpl.java

@@ -1,10 +1,7 @@
 package cn.com.ctop.common.module.service.impl;
 
-import cn.com.ctop.common.module.entity.MusicInfo;
 import cn.com.ctop.common.module.entity.MusicType;
-import cn.com.ctop.common.module.mapper.MusicInfoMapper;
 import cn.com.ctop.common.module.mapper.MusicTypeMapper;
-import cn.com.ctop.common.module.service.MusicInfoService;
 import cn.com.ctop.common.module.service.MusicTypeService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;

+ 74 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/BytedanceMusicInfo.java

@@ -0,0 +1,74 @@
+package cn.com.ctop.crawler.modules.music.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 音乐信息
+ * @author jeecg-boot
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Data
+@TableName("ctop_music_info")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ctop_music_info对象", description="音乐信息")
+public class BytedanceMusicInfo {
+
+	/**id*/
+	@TableId(type = IdType.UUID)
+    @ApiModelProperty(value = "id")
+	private Integer id;
+	/**name*/
+	@Excel(name = "name", width = 15)
+    @ApiModelProperty(value = "name")
+	private String name;
+	/**author*/
+	@Excel(name = "author", width = 15)
+    @ApiModelProperty(value = "author")
+	private String author;
+	/**usedCount*/
+	@Excel(name = "usedCount", width = 15)
+    @ApiModelProperty(value = "usedCount")
+	private Integer usedCount;
+	/**musicUrl*/
+	@Excel(name = "musicUrl", width = 15)
+    @ApiModelProperty(value = "musicUrl")
+	private String musicUrl;
+	/**coverUrl*/
+	@Excel(name = "coverUrl", width = 15)
+    @ApiModelProperty(value = "coverUrl")
+	private String coverUrl;
+	/**duration*/
+	@Excel(name = "duration", width = 15)
+    @ApiModelProperty(value = "duration")
+	private Integer duration;
+	/**source*/
+	@Excel(name = "source", width = 15)
+    @ApiModelProperty(value = "source")
+	private String source;
+	/**extId*/
+	@Excel(name = "extId", width = 15)
+    @ApiModelProperty(value = "extId")
+	private String extId;
+	/**extInfo*/
+	@Excel(name = "extInfo", width = 15)
+    @ApiModelProperty(value = "extInfo")
+	private Object extInfo;
+	/**createTime*/
+    @ApiModelProperty(value = "createTime")
+	private Date createTime;
+	/**updateTime*/
+    @ApiModelProperty(value = "updateTime")
+	private Date updateTime;
+}

+ 66 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/BytedanceMusicType.java

@@ -0,0 +1,66 @@
+package cn.com.ctop.crawler.modules.music.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * 音乐类型信息
+ * @author jeecg-boot
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Data
+@TableName("ctop_music_type")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ctop_music_type对象", description="音乐类型信息")
+public class BytedanceMusicType {
+
+	/**id*/
+	@TableId(type = IdType.UUID)
+    @ApiModelProperty(value = "id")
+	private Integer id;
+	/**type*/
+	@Excel(name = "type", width = 15)
+    @ApiModelProperty(value = "type")
+	private String type;
+	/**typeValue*/
+	@Excel(name = "typeValue", width = 15)
+    @ApiModelProperty(value = "typeValue")
+	private String typeValue;
+	/**extType*/
+	@Excel(name = "extType", width = 15)
+    @ApiModelProperty(value = "extType")
+	private String extType;
+	/**extTypeValue*/
+	@Excel(name = "extTypeValue", width = 15)
+    @ApiModelProperty(value = "extTypeValue")
+	private String extTypeValue;
+	/**musicId*/
+	@Excel(name = "musicId", width = 15)
+    @ApiModelProperty(value = "musicId")
+	private Integer musicId;
+	/**musicName*/
+	@Excel(name = "musicName", width = 15)
+    @ApiModelProperty(value = "musicName")
+	private String musicName;
+	/**author*/
+	@Excel(name = "author", width = 15)
+    @ApiModelProperty(value = "author")
+	private String author;
+	/**createTime*/
+    @ApiModelProperty(value = "createTime")
+	private Date createTime;
+}

+ 41 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/DictMusicType.java

@@ -0,0 +1,41 @@
+package cn.com.ctop.crawler.modules.music.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 抖音音乐类型
+ * @author jeecg-boot
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Data
+@TableName("ctop_dict_music_type_zh")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ctop_dict_music_type_zh对象", description="抖音音乐类型")
+public class DictMusicType {
+
+	/**id*/
+	@TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+	private Long id;
+	private String extType;
+	private String extTypeValue;
+	private String extTypeZh;
+	private String extTypeValueZh;
+	private Date createTime;
+	private Date updateTime;
+	@TableField(exist = false)
+	private List<DictMusicType> detail;
+}

+ 14 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/BytedanceMusicInfoMapper.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.crawler.modules.music.mapper;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 音乐信息
+ * @author: jeecg-boot
+ * @date:   2020-10-28
+ * @cersion: V1.0
+ */
+public interface BytedanceMusicInfoMapper extends BaseMapper<BytedanceMusicInfo> {
+
+}

+ 14 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/BytedanceMusicTypeMapper.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.crawler.modules.music.mapper;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 音乐类型信息
+ * @author: jeecg-boot
+ * @date:   2020-10-28
+ * @cersion: V1.0
+ */
+public interface BytedanceMusicTypeMapper extends BaseMapper<BytedanceMusicType> {
+
+}

+ 18 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/DictMusicTypeMapper.java

@@ -0,0 +1,18 @@
+package cn.com.ctop.crawler.modules.music.mapper;
+
+import cn.com.ctop.crawler.modules.music.entity.DictMusicType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 抖音音乐类型
+ * @author: jeecg-boot
+ * @date:   2020-10-28
+ * @cersion: V1.0
+ */
+public interface DictMusicTypeMapper extends BaseMapper<DictMusicType> {
+
+    List<DictMusicType> getAllExtTypeZh();
+    List<DictMusicType> getExtTypeValueZhByType(String extType);
+}

+ 5 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/BytedanceMusicInfoMapper.xml

@@ -0,0 +1,5 @@
+<?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.crawler.modules.music.mapper.BytedanceMusicInfoMapper">
+
+</mapper>

+ 5 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/BytedanceMusicTypeMapper.xml

@@ -0,0 +1,5 @@
+<?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.crawler.modules.music.mapper.BytedanceMusicTypeMapper">
+
+</mapper>

+ 13 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/DictMusicTypeMapper.xml

@@ -0,0 +1,13 @@
+<?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.crawler.modules.music.mapper.DictMusicTypeMapper">
+
+    <select id="getAllExtTypeZh" resultType="cn.com.ctop.crawler.modules.music.entity.DictMusicType">
+        select distinct ext_type_zh,ext_type from ctop_dict_music_type_zh
+    </select>
+
+    <select id="getExtTypeValueZhByType" resultType="cn.com.ctop.crawler.modules.music.entity.DictMusicType">
+        select distinct ext_type_value,ext_type_zh from ctop_dict_music_type_zh
+        where ext_type = #{extType}
+    </select>
+</mapper>

+ 14 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IBytedanceMusicInfoService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.crawler.modules.music.service;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 音乐信息
+ * @Author: jeecg-boot
+ * @Date:   2020-10-28
+ * @Version: V1.0
+ */
+public interface IBytedanceMusicInfoService extends IService<BytedanceMusicInfo> {
+
+}

+ 14 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IBytedanceMusicTypeService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.crawler.modules.music.service;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicType;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 音乐类型信息
+ * @Author: jeecg-boot
+ * @Date:   2020-10-28
+ * @Version: V1.0
+ */
+public interface IBytedanceMusicTypeService extends IService<BytedanceMusicType> {
+
+}

+ 16 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IDictMusicTypeService.java

@@ -0,0 +1,16 @@
+package cn.com.ctop.crawler.modules.music.service;
+
+import cn.com.ctop.crawler.modules.music.entity.DictMusicType;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 抖音音乐类型
+ * @Author: jeecg-boot
+ * @Date:   2020-10-28
+ * @Version: V1.0
+ */
+public interface IDictMusicTypeService extends IService<DictMusicType> {
+
+    JSONObject listAll();
+}

+ 18 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/BytedanceMusicInfoServiceImpl.java

@@ -0,0 +1,18 @@
+package cn.com.ctop.crawler.modules.music.service.impl;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicInfo;
+import cn.com.ctop.crawler.modules.music.mapper.BytedanceMusicInfoMapper;
+import cn.com.ctop.crawler.modules.music.service.IBytedanceMusicInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 音乐信息
+ * @author jeecg-boot
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Service
+public class BytedanceMusicInfoServiceImpl extends ServiceImpl<BytedanceMusicInfoMapper, BytedanceMusicInfo> implements IBytedanceMusicInfoService {
+
+}

+ 18 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/BytedanceMusicTypeServiceImpl.java

@@ -0,0 +1,18 @@
+package cn.com.ctop.crawler.modules.music.service.impl;
+
+import cn.com.ctop.crawler.modules.music.entity.BytedanceMusicType;
+import cn.com.ctop.crawler.modules.music.mapper.BytedanceMusicTypeMapper;
+import cn.com.ctop.crawler.modules.music.service.IBytedanceMusicTypeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 音乐类型信息
+ * @author jeecg-boot
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Service
+public class BytedanceMusicTypeServiceImpl extends ServiceImpl<BytedanceMusicTypeMapper, BytedanceMusicType> implements IBytedanceMusicTypeService {
+
+}

+ 28 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/DictMusicTypeServiceImpl.java

@@ -0,0 +1,28 @@
+package cn.com.ctop.crawler.modules.music.service.impl;
+
+import cn.com.ctop.crawler.modules.music.entity.DictMusicType;
+import cn.com.ctop.crawler.modules.music.mapper.DictMusicTypeMapper;
+import cn.com.ctop.crawler.modules.music.service.IDictMusicTypeService;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 抖音音乐类型
+ * @author jeecg-boot
+ * @date   2020-10-28
+ * @version V1.0
+ */
+@Service
+public class DictMusicTypeServiceImpl extends ServiceImpl<DictMusicTypeMapper, DictMusicType> implements IDictMusicTypeService {
+    @Autowired
+    private DictMusicTypeMapper musicTypeMapper;
+    @Override
+    public JSONObject listAll() {
+        List<DictMusicType> musicTypeList = musicTypeMapper.getAllExtTypeZh();
+        return null;
+    }
+}

+ 25 - 15
module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceDailyMaterialReportJob.java

@@ -2,6 +2,7 @@ package cn.com.ctop.job.bytedance.handler;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -12,6 +13,7 @@ import org.springframework.stereotype.Component;
 
 import java.util.Date;
 import java.util.List;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
@@ -28,43 +30,51 @@ public class BytedanceDailyMaterialReportJob {
     public ReturnT<String> execute(String param) throws Exception {
         Date getDate2 = DateUtils.addDay(new Date(), -2);
         String date2 = DateUtils.formatDate(getDate2);
-
+        Long start = System.currentTimeMillis();
         Date getDate = DateUtils.addDay(new Date(), -1);
         String date = DateUtils.formatDate(getDate);
         XxlJobLogger.log("头条获取素材报表数据任务开始,任务时间:" + date2 + "~" + date);
 
         List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
-        if (null == tokens || tokens.size() <= 0) {
+        if (null == tokens || tokens.isEmpty()) {
             XxlJobLogger.log("头条获取素材报表数据任务执行失败:未获取到可用的token");
             return ReturnT.FAIL;
         }
+        CountDownLatch countDownLatch = new CountDownLatch(tokens.size());
 
-        tokens.forEach(token -> {
-            executorService.submit(new Runnable() {
+        tokens.forEach(token -> executorService.submit(new Runnable() {
                 @Override
                 public void run() {
                     try {
                         //获取头条素材报表两天前的数据
-                        XxlJobLogger.log("账户"+token.getAccountId() + "素材报表数据任务开始,任务时间:" + date2 + "~" + date2);
+                        XxlJobLogger.log("账户"+token.getAccountId() + "素材报表数据任务开始,任务时间:" + date + "~" + date2);
                         bytedanceReportService.bytedanceMaterialReport(token, date2, date2);
-                        XxlJobLogger.log("账户"+token.getAccountId() + "素材报表数据任务完成,任务时间:" + date2 + "~" + date2);
-
-                        //获取头条素材报表数据
-                        XxlJobLogger.log("账户"+token.getAccountId() + "素材报表数据任务开始,任务时间:" + date + "~" + date);
                         bytedanceReportService.bytedanceMaterialReport(token, date, date);
-                        XxlJobLogger.log("账户"+token.getAccountId() + "素材报表数据任务完成,任务时间:" + date + "~" + date);
-
-                        //获取头条素材报表两天前的数据
-                        bytedanceReportService.bytedanceVideoMaterialReport(token, date2, date2);
                         //获取头条素材报表数据
+                        bytedanceReportService.bytedanceVideoMaterialReport(token, date2, date2);
                         bytedanceReportService.bytedanceVideoMaterialReport(token, date, date);
+                        XxlJobLogger.log("账户"+token.getAccountId() + "素材报表数据任务完成,任务时间:" + date + "~" + date2);
                     } catch (Exception e) {
                         e.printStackTrace();
                     } finally {
+                        countDownLatch.countDown();
                     }
                 }
-            });
-        });
+            }));
+
+        try {
+            countDownLatch.await();
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        Long end = System.currentTimeMillis();
+        XxlJobLogger.log("头条素材数据获取耗时:{}毫秒", end - start);
+
+        videoReportDailyService.videoInfoList(date, date);
+        videoReportDailyService.videoInfoList(date2, date2);
         return ReturnT.SUCCESS;
     }
+
+    @Autowired
+    private IByteDanceVideoReportDailyService videoReportDailyService;
 }

+ 93 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouVideoGetController.java

@@ -1,13 +1,20 @@
 package cn.com.ctop.kuaishou.modules.batch.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouReportDailyMaterialService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouVideoGetService;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -30,9 +37,7 @@ 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;
+import java.util.*;
 
 /**
  * @Description: 快手-获取视频接口
@@ -47,6 +52,8 @@ import java.util.Map;
 public class KuaiShouVideoGetController {
     @Autowired
     private IKuaiShouVideoGetService kuaiShouVideoGetService;
+    @Autowired
+    private IKuaiShouReportDailyMaterialService kuaiShouReportDailyMaterialService;
 
     /**
      * 分页列表查询
@@ -73,6 +80,89 @@ public class KuaiShouVideoGetController {
         return result;
     }
 
+
+    @GetMapping(value = "/getVideoList")
+    public Result<PageInfo<KuaiShouVideoGetVo>> getVideoList(Long accountId,
+                                                             String startDate,
+                                                             String endDate,
+                                                             String materialType,
+                                                             String channelType,
+                                                             String orderBy,
+                                                             @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                             HttpServletRequest req) {
+
+
+        Result<PageInfo<KuaiShouVideoGetVo>> result = new Result<>();
+        try {
+            if (Check.isNull(accountId)) {
+                throw new Exception("请传入账户id");
+            }
+            if (Check.isNull(materialType)) {
+                throw new Exception("请传入素材类型");
+            }
+            if (Check.isNull(channelType)) {
+                throw new Exception("请传入素材渠道");
+            }
+            if (Check.isNull(orderBy)) {
+                throw new Exception("请传入排序方式");
+            }
+            List<KuaiShouVideoGetVo> list = new ArrayList<>();
+            PageHelper.startPage(pageNo, pageSize);
+            Map<String, Object> requestMap = new HashMap<>();
+            requestMap.put("accountId", accountId);
+            requestMap.put("orderBy", orderBy);
+            requestMap.put("materialType", materialType);
+            requestMap.put("channelType", channelType);
+            if (orderBy.equals("time")) {
+                if (!Check.isNull(startDate) && !Check.isNull(endDate)) {
+                    requestMap.put("startDate", startDate + " 00:00:00");
+                    requestMap.put("endDate", endDate + " 59:59:59");
+                }
+                list = kuaiShouVideoGetService.getVideoList(requestMap);
+            } else if (orderBy.equals("cost")) {
+                if (!Check.isNull(startDate) && !Check.isNull(endDate)) {
+                    requestMap.put("startDate", startDate);
+                    requestMap.put("endDate", endDate);
+                }
+                list = kuaiShouReportDailyMaterialService.getVideoList(requestMap);
+            }
+            PageInfo<KuaiShouVideoGetVo> pageInfo = new PageInfo<>(list);
+            result.setSuccess(true);
+            result.setResult(pageInfo);
+        } catch (Exception e) {
+            e.printStackTrace();
+            result.setSuccess(false);
+            result.setMessage(e.getMessage());
+        }
+
+
+        return result;
+
+    }
+
+
+    public static Map<String, Object> parseJSON2Map(String jsonStr) {
+        Map<String, Object> map = new HashMap<String, Object>();
+        JSONObject json = JSONObject.parseObject(jsonStr);
+        for (Object k : json.keySet()) {
+            Object v = json.get(k);
+            if (v instanceof JSONArray) {
+                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
+                Iterator<Object> it = ((JSONArray) v).iterator();
+                while (it.hasNext()) {
+                    JSONObject json2 = (JSONObject) it.next();
+                    list.add(parseJSON2Map(json2.toString()));
+                }
+                map.put(k.toString(), list);
+            } else {
+                map.put(k.toString(), v);
+            }
+        }
+        return map;
+    }
+
+
     /**
      * 添加
      *

+ 116 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/vo/KuaiShouVideoGetVo.java

@@ -0,0 +1,116 @@
+package cn.com.ctop.kuaishou.modules.batch.entity.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @Description: 快手-获取视频接口
+ * @Author: jeecg-boot
+ * @Date: 2019-07-25
+ * @Version: V1.0
+ */
+
+public class KuaiShouVideoGetVo implements Serializable {
+
+    private BigDecimal charge;
+    private String statDate;
+
+    /**
+     * 视频id
+     */
+    @Excel(name = "视频id", width = 15)
+    @ApiModelProperty(value = "视频id")
+    private String photoId;
+
+    /**
+     * 视频预览链接
+     */
+    @Excel(name = "视频预览链接", width = 15)
+    @ApiModelProperty(value = "视频预览链接")
+    private String url;
+    /**
+     * 视频首帧图片链接
+     */
+    @Excel(name = "视频首帧图片链接", width = 15)
+    @ApiModelProperty(value = "视频首帧图片链接")
+    private String coverUrl;
+    /**
+     * 视频首帧图片链接
+     */
+    private String signature;
+
+    private Integer materialType;
+
+
+    public BigDecimal getCharge() {
+        return charge;
+    }
+
+    public void setCharge(BigDecimal charge) {
+        this.charge = charge;
+    }
+
+    public String getStatDate() {
+        return statDate;
+    }
+
+    public void setStatDate(String statDate) {
+        this.statDate = statDate;
+    }
+
+    public String getPhotoId() {
+        return photoId;
+    }
+
+    public void setPhotoId(String photoId) {
+        this.photoId = photoId;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getCoverUrl() {
+        return coverUrl;
+    }
+
+    public void setCoverUrl(String coverUrl) {
+        this.coverUrl = coverUrl;
+    }
+
+    public String getSignature() {
+        return signature;
+    }
+
+    public void setSignature(String signature) {
+        this.signature = signature;
+    }
+
+    public Integer getMaterialType() {
+        return materialType;
+    }
+
+    public void setMaterialType(Integer materialType) {
+        this.materialType = materialType;
+    }
+
+    @Override
+    public String toString() {
+        return "KuaiShouVideoGetVo{" +
+                "charge=" + charge +
+                ", statDate='" + statDate + '\'' +
+                ", photoId='" + photoId + '\'' +
+                ", url='" + url + '\'' +
+                ", coverUrl='" + coverUrl + '\'' +
+                ", signature='" + signature + '\'' +
+                ", materialType=" + materialType +
+                '}';
+    }
+}

+ 3 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouReportDailyMaterialMapper.java

@@ -1,5 +1,6 @@
 package cn.com.ctop.kuaishou.modules.batch.mapper;
 
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterial;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterialVo;
 import cn.com.ctop.kuaishou.modules.report.entity.VideoGetvo;
@@ -7,6 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 素材
@@ -24,4 +26,5 @@ public interface KuaiShouReportDailyMaterialMapper extends BaseMapper<KuaiShouRe
 
     List<KuaiShouReportDailyMaterialVo> getPhotoListByDate(@Param("statDate") String statDate);
 
+    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap);
 }

+ 4 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouVideoGetMapper.java

@@ -1,10 +1,12 @@
 package cn.com.ctop.kuaishou.modules.batch.mapper;
 
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-获取视频接口
@@ -15,4 +17,6 @@ import java.util.List;
 public interface KuaiShouVideoGetMapper extends BaseMapper<KuaiShouVideoGet> {
 
     void replaceBatch(@Param(value = "videos") List<KuaiShouVideoGet> videoGets);
+
+    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap);
 }

+ 42 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml

@@ -143,4 +143,46 @@
       limit 1
     </select>
 
+
+    <select id="getVideoList" parameterType="java.util.Map"
+            resultType="cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo">
+
+        SELECT
+        sum(t1.charge) as 'charge',
+        t1.photo_id AS 'photoId',
+        t1.photo_url AS 'url',
+        t1.cover_url AS 'coverUrl',
+        t1.signature AS 'signature',
+        t2.material_type AS 'materialType'
+        FROM
+        ctop_kuaishou_report_daily_material t1
+        LEFT JOIN (
+        SELECT
+        material_type,
+        signature,
+        status
+        FROM
+        ctop_kuaishou_video_get
+        WHERE
+        account_id = #{accountId} group by signature) t2
+        ON t1.signature = t2.signature
+        WHERE
+        t1.account_id = #{accountId}
+        AND t1.channel_type = #{channelType}
+        AND t2.material_type = #{materialType}
+        AND t2.status = 0
+        <if test="startDate != null and startDate != '' ">
+            and t1.stat_date &gt;= #{startDate}
+        </if>
+        <if test="endDate != null and endDate != '' ">
+            and t1.stat_date &lt;= #{endDate}
+        </if>
+
+        GROUP BY
+        signature
+        ORDER BY
+        sum(t1.charge) DESC
+    </select>
+
+
 </mapper>

+ 27 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml

@@ -13,7 +13,7 @@
         material_type,
         signature,
         update_time
-       )
+        )
         values
         <foreach collection="videos" item="video" separator=",">
             (
@@ -31,4 +31,30 @@
             )
         </foreach>
     </insert>
+
+
+    <select id="getVideoList" parameterType="java.util.Map"
+            resultType="cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo">
+        select
+        stat_date as 'statDate',
+        photo_id as 'photoId',
+        url as 'url',
+        cover_url as 'coverUrl',
+        signature as 'signature',
+        material_type as 'materialType'
+        from ctop_kuaishou_video_get
+        where account_id = #{accountId}
+        and channel_type = #{channelType}
+        and material_type = #{materialType}
+        and status = 0
+        <if test="startDate != null and startDate != '' ">
+            and stat_date &gt;= #{startDate}
+        </if>
+        <if test="endDate != null and endDate != '' ">
+            and stat_date &lt;= #{endDate}
+        </if>
+        group by signature
+        order by stat_date desc
+    </select>
+
 </mapper>

+ 3 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouReportDailyMaterialService.java

@@ -1,10 +1,11 @@
 package cn.com.ctop.kuaishou.modules.batch.service;
 
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterial;
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 素材
@@ -14,4 +15,5 @@ import java.util.List;
  */
 public interface IKuaiShouReportDailyMaterialService extends IService<KuaiShouReportDailyMaterial> {
 
+    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap);
 }

+ 4 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouVideoGetService.java

@@ -1,9 +1,11 @@
 package cn.com.ctop.kuaishou.modules.batch.service;
 
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-获取视频接口
@@ -15,4 +17,6 @@ public interface IKuaiShouVideoGetService extends IService<KuaiShouVideoGet> {
     void replaceBatch(List<KuaiShouVideoGet> videoGets);
 
     void getKeyFrame(String token, Long accountId, String md5, String photoId);
+
+    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> stringObjectMap);
 }

+ 11 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouReportDailyMaterialServiceImpl.java

@@ -1,11 +1,16 @@
 package cn.com.ctop.kuaishou.modules.batch.service.impl;
 
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
 import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouReportDailyMaterialMapper;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouReportDailyMaterialService;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterial;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 素材
  *
@@ -15,5 +20,11 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class KuaiShouReportDailyMaterialServiceImpl extends ServiceImpl<KuaiShouReportDailyMaterialMapper, KuaiShouReportDailyMaterial> implements IKuaiShouReportDailyMaterialService {
+    @Autowired
+    private KuaiShouReportDailyMaterialMapper dailyMaterialMapper;
 
+    @Override
+    public List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap) {
+        return dailyMaterialMapper.getVideoList(requestMap);
+    }
 }

+ 6 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouVideoGetServiceImpl.java

@@ -6,6 +6,7 @@ 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.kuaishou.modules.batch.entity.KuaiShouVideoGet;
+import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
 import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouVideoGetMapper;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouVideoGetService;
 import com.alibaba.fastjson.JSONArray;
@@ -117,4 +118,9 @@ public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMap
         }
 
     }
+
+    @Override
+    public List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap) {
+        return videoGetMapper.getVideoList(requestMap);
+    }
 }

+ 4 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -1289,12 +1289,16 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
     @Override
     public void getCreativeList(CtopOauthToken token, Date startDate, Date endDate) {
+
         getCreativeListByPage(token.getAccessToken(), token.getAccountId(), startDate, endDate, 1);
     }
 
 
     public void getCreativeListByPage(String accessToken, Long advertiserId, Date startDate, Date endDate, Integer page) {
         try {
+
+
+            Thread.sleep(1500);
             String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_LIST;
             Map<String, String> headers = new HashMap<>();
             headers.put("Content-Type", " application/json");

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

@@ -54,8 +54,6 @@ public interface BytedanceAccountReportMapper {
 
     String getRoleCodeByUserId(@Param("userId")String userId);
 
-    //List<Long> queryProjectInfoByAdmin(@Param("userId")String userId, @Param("mediaIds")List<Long> mediaIds);
-
     List<Long> getSaleProjects(@Param("userId")String userId, @Param("mediaIds")List<Long> mediaIds);
 
     List<Long> queryProjectInfoByAdmin(@Param("mediaIds")List<Long> mediaIds);