You've already forked FrameTour-BE
feat(basic): 添加视频更新检查功能
- 新增 VideoUpdateConfig 类用于配置视频更新检查参数 - 添加 VideoUpdateCheckVO 类作为视频更新检查响应模型 -功能包括检测片段变化、判断是否可更新以及统计片段数量等
This commit is contained in:
32
src/main/java/com/ycwl/basic/config/VideoUpdateConfig.java
Normal file
32
src/main/java/com/ycwl/basic/config/VideoUpdateConfig.java
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
package com.ycwl.basic.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频更新检查配置
|
||||||
|
* @author Claude
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "video.update")
|
||||||
|
public class VideoUpdateConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否将片段变化检测为新增
|
||||||
|
* true: 任何变化都视为新增
|
||||||
|
* false: 只有数量增加才视为新增
|
||||||
|
*/
|
||||||
|
private boolean detectChangesAsNew = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最小新增片段数量才认为可更新
|
||||||
|
*/
|
||||||
|
private int minNewSegmentCount = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用视频更新检查功能
|
||||||
|
*/
|
||||||
|
private boolean enabled = true;
|
||||||
|
}
|
@@ -0,0 +1,50 @@
|
|||||||
|
package com.ycwl.basic.model.mobile.goods;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频更新检查响应VO
|
||||||
|
* @author Claude
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VideoUpdateCheckVO {
|
||||||
|
/**
|
||||||
|
* 是否可更新
|
||||||
|
*/
|
||||||
|
private boolean canUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增片段数量
|
||||||
|
*/
|
||||||
|
private int newSegmentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前总片段数量
|
||||||
|
*/
|
||||||
|
private int totalSegmentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原始片段数量
|
||||||
|
*/
|
||||||
|
private int originalSegmentCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频ID
|
||||||
|
*/
|
||||||
|
private Long videoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务ID
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人脸ID
|
||||||
|
*/
|
||||||
|
private Long faceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板ID
|
||||||
|
*/
|
||||||
|
private Long templateId;
|
||||||
|
}
|
Reference in New Issue
Block a user