CourseDetails 移除多余值
This commit is contained in:
@@ -20,7 +20,7 @@ import java.math.BigDecimal;
|
||||
@RestController
|
||||
@Api(value = "短剧信息", tags = {"短剧信息"})
|
||||
@RequestMapping(value = "/course")
|
||||
public class CourseController extends AbstractController {
|
||||
class CourseController extends AbstractController {
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
@Autowired
|
||||
@@ -113,61 +113,61 @@ public class CourseController extends AbstractController {
|
||||
return courseService.deleteCourseDetailsByIds(ids);
|
||||
}
|
||||
|
||||
@PostMapping("/dyVideoUpload")
|
||||
@ApiOperation("抖音短剧上传")
|
||||
public Result dyVideoUpload(Long courseId){
|
||||
return courseService.dyVideoUpload(courseId);
|
||||
}
|
||||
// @PostMapping("/dyVideoUpload")
|
||||
// @ApiOperation("抖音短剧上传")
|
||||
// public Result dyVideoUpload(Long courseId){
|
||||
// return courseService.dyVideoUpload(courseId);
|
||||
// }
|
||||
|
||||
@PostMapping("/dyVideoAudit")
|
||||
@ApiOperation("抖音短剧送审")
|
||||
public Result dyVideoAudit(Long courseId){
|
||||
return courseService.dyVideoAudit(courseId);
|
||||
}
|
||||
// @PostMapping("/dyVideoAudit")
|
||||
// @ApiOperation("抖音短剧送审")
|
||||
// public Result dyVideoAudit(Long courseId){
|
||||
// return courseService.dyVideoAudit(courseId);
|
||||
// }
|
||||
|
||||
@PostMapping("/dyVideoUp")
|
||||
@ApiOperation("抖音短剧上线")
|
||||
public Result dyVideoUp(Long courseId){
|
||||
return courseService.dyVideoUp(courseId);
|
||||
}
|
||||
// @PostMapping("/dyVideoUp")
|
||||
// @ApiOperation("抖音短剧上线")
|
||||
// public Result dyVideoUp(Long courseId){
|
||||
// return courseService.dyVideoUp(courseId);
|
||||
// }
|
||||
|
||||
@PostMapping("/setDyNotifyUrl")
|
||||
@ApiOperation("设置抖音视频回调地址")
|
||||
public Result setDyNotifyUrl(String url){
|
||||
return courseService.setDyNotifyUrl(url);
|
||||
}
|
||||
// @PostMapping("/setDyNotifyUrl")
|
||||
// @ApiOperation("设置抖音视频回调地址")
|
||||
// public Result setDyNotifyUrl(String url){
|
||||
// return courseService.setDyNotifyUrl(url);
|
||||
// }
|
||||
|
||||
@PostMapping("/uploadCourseDetails")
|
||||
@ApiOperation("单个集上传")
|
||||
public Result uploadCourseDetails(Long courseDetailsId){
|
||||
return courseService.uploadCourseDetails(courseDetailsId);
|
||||
}
|
||||
// @PostMapping("/uploadCourseDetails")
|
||||
// @ApiOperation("单个集上传")
|
||||
// public Result uploadCourseDetails(Long courseDetailsId){
|
||||
// return courseService.uploadCourseDetails(courseDetailsId);
|
||||
// }
|
||||
|
||||
@PostMapping("/updateDyCourse")
|
||||
@ApiOperation("修改抖音短剧")
|
||||
public Result updateDyCourse(@RequestBody Course course){
|
||||
return courseService.updateDyCourse(course);
|
||||
}
|
||||
// @PostMapping("/updateDyCourse")
|
||||
// @ApiOperation("修改抖音短剧")
|
||||
// public Result updateDyCourse(@RequestBody Course course){
|
||||
// return courseService.updateDyCourse(course);
|
||||
// }
|
||||
|
||||
@GetMapping("/sysWxCourse")
|
||||
@ApiOperation("同步微信已提交审核的短剧")
|
||||
public Result sysWxCourse(Integer freeNum, BigDecimal coursePrice,Integer maxGood,Integer minGood){
|
||||
return courseService.sysWxCourse(freeNum, coursePrice, maxGood, minGood);
|
||||
}
|
||||
// @GetMapping("/sysWxCourse")
|
||||
// @ApiOperation("同步微信已提交审核的短剧")
|
||||
// public Result sysWxCourse(Integer freeNum, BigDecimal coursePrice,Integer maxGood,Integer minGood){
|
||||
// return courseService.sysWxCourse(freeNum, coursePrice, maxGood, minGood);
|
||||
// }
|
||||
|
||||
@PostMapping("/uploadWxCourse")
|
||||
@ApiOperation("提交微信备案审核")
|
||||
public Result uploadWxCourse(Long courseId,Integer qualificationType,String registrationNumber,
|
||||
String qualificationCertificateMaterialId,String costOfProduction,String costCommitmentLetterMaterialId){
|
||||
return courseService.uploadWxCourse(courseId, qualificationType, registrationNumber, qualificationCertificateMaterialId, costOfProduction, costCommitmentLetterMaterialId);
|
||||
}
|
||||
// @PostMapping("/uploadWxCourse")
|
||||
// @ApiOperation("提交微信备案审核")
|
||||
// public Result uploadWxCourse(Long courseId,Integer qualificationType,String registrationNumber,
|
||||
// String qualificationCertificateMaterialId,String costOfProduction,String costCommitmentLetterMaterialId){
|
||||
// return courseService.uploadWxCourse(courseId, qualificationType, registrationNumber, qualificationCertificateMaterialId, costOfProduction, costCommitmentLetterMaterialId);
|
||||
// }
|
||||
|
||||
|
||||
@GetMapping("/getWxToken")
|
||||
@ApiOperation("获取微信小程序token")
|
||||
public Result getWxToken(){
|
||||
return Result.success().put("data",SenInfoCheckUtil.getMpToken());
|
||||
}
|
||||
// @GetMapping("/getWxToken")
|
||||
// @ApiOperation("获取微信小程序token")
|
||||
// public Result getWxToken(){
|
||||
// return Result.success().put("data",SenInfoCheckUtil.getMpToken());
|
||||
// }
|
||||
|
||||
/**
|
||||
* 剧导入列表--导入
|
||||
|
||||
@@ -88,42 +88,42 @@ public class CourseDetails implements Serializable {
|
||||
/**
|
||||
* 抖音视频id
|
||||
*/
|
||||
private String dyCourseDetailsId;
|
||||
// private String dyCourseDetailsId;
|
||||
|
||||
/**
|
||||
* 视频上传状态 1上传中 2上传成功 3上传失败
|
||||
*/
|
||||
private Integer dyUrlStatus;
|
||||
// private Integer dyUrlStatus;
|
||||
|
||||
/**
|
||||
* 抖音封面图id
|
||||
*/
|
||||
private String dyImgId;
|
||||
// private String dyImgId;
|
||||
|
||||
/**
|
||||
* 抖音集id
|
||||
*/
|
||||
private String dyEpisodeId;
|
||||
// private String dyEpisodeId;
|
||||
|
||||
/**
|
||||
* 抖音提审状态 1已提交 2已通过 3已拒绝 4已上线
|
||||
*/
|
||||
private Integer dyStatus;
|
||||
// private Integer dyStatus;
|
||||
|
||||
/**
|
||||
* 抖音审核内容
|
||||
*/
|
||||
private String dyStatusContent;
|
||||
// private String dyStatusContent;
|
||||
|
||||
/**
|
||||
* 当前版本号
|
||||
*/
|
||||
private String dyVersion;
|
||||
// private String dyVersion;
|
||||
|
||||
/**
|
||||
* 微信视频id
|
||||
*/
|
||||
private String wxCourseDetailsId;
|
||||
// private String wxCourseDetailsId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
@@ -133,7 +133,7 @@ public class CourseDetails implements Serializable {
|
||||
/**
|
||||
* 是否允许广告解锁 1是
|
||||
*/
|
||||
private Integer advertising;
|
||||
// private Integer advertising;
|
||||
|
||||
/**
|
||||
* 播放量
|
||||
@@ -156,7 +156,7 @@ public class CourseDetails implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private Integer courseDetailsCount;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String wxUrl;
|
||||
// @TableField(exist = false)
|
||||
// private String wxUrl;
|
||||
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
||||
//微信内
|
||||
String url = "https://api.weixin.qq.com/wxa/sec/vod/getmedialink?access_token=" + SenInfoCheckUtil.getMpToken();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("media_id", courseDetails.getWxCourseDetailsId());
|
||||
// jsonObject.put("media_id", courseDetails.getWxCourseDetailsId());
|
||||
jsonObject.put("t", (new Date().getTime() / 1000) + 7200);
|
||||
String s = HttpClientUtil.doPostJson(url, jsonObject.toJSONString());
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(s);
|
||||
@@ -319,7 +319,7 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
||||
}
|
||||
JSONObject media_info = jsonObject1.getJSONObject("media_info");
|
||||
String mp4_url = media_info.getString("mp4_url");
|
||||
courseDetails.setWxUrl(mp4_url);
|
||||
// courseDetails.setWxUrl(mp4_url);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -365,11 +365,15 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
||||
if (!Validator.isNumber(randomNum)) {
|
||||
throw new SqxException("随机码必须是数字");
|
||||
}
|
||||
Integer detailCount = baseMapper.selectCount(new QueryWrapper<>());
|
||||
Integer detailCount = baseMapper.selectCount(new LambdaQueryWrapper<CourseDetails>()
|
||||
.eq(CourseDetails::getGood,1)
|
||||
.eq(CourseDetails::getIsPrice,2));
|
||||
if (detailCount != null) {
|
||||
PageHelper.startPage(RandomUtil.randomInt(1, detailCount / 10), 10);
|
||||
}
|
||||
List<CourseDetails> list = baseMapper.selectList(new QueryWrapper<>());
|
||||
List<CourseDetails> list = baseMapper.selectList(new LambdaQueryWrapper<CourseDetails>()
|
||||
.eq(CourseDetails::getGood,1)
|
||||
.eq(CourseDetails::getIsPrice,2));
|
||||
|
||||
PageInfo<CourseDetails> pageInfo = new PageInfo<>(list);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user