This commit is contained in:
abu 2025-04-07 15:19:45 +08:00
parent 343dcbeb54
commit 9d89ff58e1
4 changed files with 28 additions and 6 deletions

View File

@ -78,7 +78,7 @@ public class VlogController extends BaseInfoProperties {
transVdUrl = (String) output.get("Url");
}
}
log.info("任务流 [截取首帧,视频转码,添加水印] 完成, FileId: {}, 封面图 URL: {},视频地址: {}", fileId, coverUrl,transVdUrl);
log.info("任务流 [截取首帧,视频转码] 完成, FileId: {}, 封面图 URL: {},视频地址: {}", fileId, coverUrl,transVdUrl);
// TODO: 更新数据库存储首帧图,设置云端地址删除本地视频文件
vlogService.updateVlogFirstImg(fileId,coverUrl,transVdUrl);
} else {
@ -114,12 +114,12 @@ public class VlogController extends BaseInfoProperties {
String label = (String) output.get("Label"); // 违规内容
String subLabel = (String) output.get("SubLabel"); // 违规子标签
log.info("视频文件 {} 审核驳回, 原因: {} - {}", fileId, label, subLabel);
// TODO: 更新数据库
// TODO: 更新数据库,发送站内信
vlogService.updateVlogStatus(fileId,2,label);
} else if ("pass".equals(suggestion)) {
// 审核通过处理通过逻辑,修改视频状态为1发送站内消息告知审核结果
log.info("视频文件 {} 审核通过", fileId);
// TODO: 更新数据库
// TODO: 更新数据库发送站内信
vlogService.updateVlogStatus(fileId,1,"通过");
} else if ("review".equals(suggestion)){
@ -127,7 +127,7 @@ public class VlogController extends BaseInfoProperties {
String label = (String) output.get("Label"); // 违规内容
String subLabel = (String) output.get("SubLabel"); // 违规子标签
log.info("视频文件 {} 建议复审, 原因: {} - {}", fileId, label, subLabel);
// TODO: 更新数据库
// TODO: 更新数据库发送站内信
vlogService.updateVlogStatus(fileId,3,"等待复审");
}
@ -161,6 +161,8 @@ public class VlogController extends BaseInfoProperties {
@GetMapping("indexList")
public GraceJSONResult indexList(@RequestParam(defaultValue = "") String userId,
@RequestParam(defaultValue = "") String search,
@RequestParam(defaultValue = "") String cityCode,
@RequestParam(defaultValue = "") String status,
@RequestParam Integer page,
@RequestParam Integer pageSize) {
@ -171,7 +173,7 @@ public class VlogController extends BaseInfoProperties {
pageSize = COMMON_PAGE_SIZE;
}
PagedGridResult gridResult = vlogService.getIndexVlogList(userId, search, page, pageSize);
PagedGridResult gridResult = vlogService.getIndexVlogList(userId, search, cityCode,status, page, pageSize);
return GraceJSONResult.ok(gridResult);
}

View File

@ -29,8 +29,18 @@
v.vloger_id = u.id
WHERE
v.is_private = 0
<choose>
<when test="paramMap.status != null and paramMap.status!=''">
AND v.status = #{paramMap.status}
</when>
<otherwise>
AND v.status = 1
</otherwise>
</choose>
AND v.first_frame_img IS NOT NULL
<if test="paramMap.cityCode != null and paramMap.cityCode != ''">
AND v.cityCode = #{paramMap.cityCode}
</if>
<if test="paramMap.search != null and paramMap.search != ''">
AND v.title like '%${paramMap.search}%'
</if>

View File

@ -25,6 +25,8 @@ public interface VlogService {
*/
public PagedGridResult getIndexVlogList(String userId,
String search,
String cityCode,
String status,
Integer page,
Integer pageSize);

View File

@ -100,6 +100,8 @@ public class VlogServiceImpl extends BaseInfoProperties implements VlogService {
@Override
public PagedGridResult getIndexVlogList(String userId,
String search,
String cityCode,
String status,
Integer page,
Integer pageSize) {
@ -109,6 +111,12 @@ public class VlogServiceImpl extends BaseInfoProperties implements VlogService {
if (StringUtils.isNotBlank(search)) {
map.put("search", search);
}
if (StringUtils.isNotBlank(cityCode)) {
map.put("cityCode", cityCode);
}
if (StringUtils.isNotBlank(status)) {
map.put("status", status);
}
List<IndexVlogVO> list = vlogMapperCustom.getIndexVlogList(map);
for (IndexVlogVO v : list) {