Browse Source

抖音音乐库代码

syh 4 years ago
parent
commit
df6a640d6f
21 changed files with 855 additions and 20 deletions
  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. 51 15
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  5. 0 3
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MusicTypeServiceImpl.java
  6. 74 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/BytedanceMusicInfo.java
  7. 66 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/BytedanceMusicType.java
  8. 41 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/entity/DictMusicType.java
  9. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/BytedanceMusicInfoMapper.java
  10. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/BytedanceMusicTypeMapper.java
  11. 18 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/DictMusicTypeMapper.java
  12. 5 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/BytedanceMusicInfoMapper.xml
  13. 5 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/BytedanceMusicTypeMapper.xml
  14. 13 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/mapper/xml/DictMusicTypeMapper.xml
  15. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IBytedanceMusicInfoService.java
  16. 14 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IBytedanceMusicTypeService.java
  17. 16 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/IDictMusicTypeService.java
  18. 18 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/BytedanceMusicInfoServiceImpl.java
  19. 18 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/BytedanceMusicTypeServiceImpl.java
  20. 28 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/music/service/impl/DictMusicTypeServiceImpl.java
  21. 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;
+	}
+}

File diff suppressed because it is too large
+ 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;
+    }
+}

+ 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);