|
|
|
@ -2,7 +2,9 @@ package com.zh.project0512.controller.manage;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
|
import com.zh.project0512.annotation.adminTokenValid;
|
|
|
|
|
import com.zh.project0512.annotation.tokenValid;
|
|
|
|
|
import com.zh.project0512.model.Video;
|
|
|
|
@ -72,4 +74,51 @@ public class VideoController {
|
|
|
|
|
qw.like(param.getTaskTitle()!=null, "t4.title",param.getTaskTitle());
|
|
|
|
|
return Result.success(videoService.pageList(MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageNum()),qw));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
|
static class VVParam {
|
|
|
|
|
@NotNull(message = "id不能为空")
|
|
|
|
|
@Min(value = 1, message = "id最小值为1")
|
|
|
|
|
@Schema(title = "视频id")
|
|
|
|
|
private Integer id;
|
|
|
|
|
@NotNull(message = "审核状态不能为空")
|
|
|
|
|
@Min(value = 2, message = "审核状态为:2通过;3拒绝")
|
|
|
|
|
@Max(value = 3, message = "审核状态为:2通过;3拒绝")
|
|
|
|
|
@Schema(title = "审核状态",description ="2通过;3拒绝" )
|
|
|
|
|
private Integer status;
|
|
|
|
|
@Schema(title = "播放次数",description = "抖音1快手2字段")
|
|
|
|
|
private Integer playNum;
|
|
|
|
|
@Schema(title = "点赞次数")
|
|
|
|
|
private Integer commendNum;
|
|
|
|
|
@Schema(title = "收藏次数",description = "抖音1快手2字段")
|
|
|
|
|
private Integer collectionNum;
|
|
|
|
|
@Schema(title = "评论次数")
|
|
|
|
|
private Integer commentNum;
|
|
|
|
|
@Schema(title = "转发次数",description = "视频号4字段")
|
|
|
|
|
private Integer reSendNum;
|
|
|
|
|
@Schema(title = "推荐次数",description = "视频号4字段")
|
|
|
|
|
private Integer recommendNum;
|
|
|
|
|
@Schema(title = "拒绝理由")
|
|
|
|
|
private String reason;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "视频审核")
|
|
|
|
|
@PostMapping("/valid")
|
|
|
|
|
@adminTokenValid
|
|
|
|
|
public Result valid(@Validated @RequestBody VVParam param) {
|
|
|
|
|
int id = param.getId();
|
|
|
|
|
if(param.getStatus() == 3){
|
|
|
|
|
String reason = param.getReason();
|
|
|
|
|
if(reason == null){
|
|
|
|
|
return Result.fail(HttpStatusEnum.CUSTOM_EXCEPTION,"请说明拒绝理由");
|
|
|
|
|
}
|
|
|
|
|
UpdateWrapper<Video> set = new UpdateWrapper<>();
|
|
|
|
|
set.eq("id", id).set("status", 3).set("reason", param.getReason());
|
|
|
|
|
videoService.update(set);
|
|
|
|
|
}
|
|
|
|
|
UpdateWrapper<Video> up = new UpdateWrapper<>();
|
|
|
|
|
// up.set();
|
|
|
|
|
return Result.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|