You've already forked FrameTour-BE
feat(video-review): 支持机位多维度评价功能
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good
- 新增NestedMapTypeHandler处理嵌套Map与JSON互转 - 修改VideoReview相关实体类和DTO以支持嵌套Map结构 - 更新数据库查询逻辑以适配新的评价数据结构 - 优化平均分计算方法以处理多机位多维度评分 - 完善MyBatis配置中的typeHandler引用 - 补充视频查询接口返回任务开始结束时间字段 - 修正SQL关联查询条件确保数据准确性
This commit is contained in:
@@ -63,6 +63,10 @@ public class VideoRespVO {
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date endTime;
|
||||
private Integer height;
|
||||
private Integer width;
|
||||
private BigDecimal duration;
|
||||
|
||||
@@ -26,8 +26,10 @@ public class VideoReviewAddReqDTO {
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 机位快速评价JSON(可选)
|
||||
* 格式: {"角度":5,"清晰度":4,"构图":5}
|
||||
* 机位评价JSON(可选)
|
||||
* 格式: {"12345": {"清晰度":5,"构图":4,"色彩":5,"整体效果":4}, "12346": {...}}
|
||||
* 外层key为机位ID,内层Map为该机位的各维度评分
|
||||
* 评分维度: 清晰度, 构图, 色彩, 整体效果
|
||||
*/
|
||||
private Map<String, Integer> cameraPositionRating;
|
||||
private Map<String, Map<String, Integer>> cameraPositionRating;
|
||||
}
|
||||
|
||||
@@ -58,9 +58,11 @@ public class VideoReviewRespDTO {
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 机位快速评价JSON
|
||||
* 机位评价JSON
|
||||
* 格式: {"12345": {"清晰度":5,"构图":4,"色彩":5,"整体效果":4}, "12346": {...}}
|
||||
* 外层key为机位ID,内层Map为该机位的各维度评分
|
||||
*/
|
||||
private Map<String, Integer> cameraPositionRating;
|
||||
private Map<String, Map<String, Integer>> cameraPositionRating;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
||||
@@ -4,7 +4,7 @@ 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 com.ycwl.basic.handler.MapTypeHandler;
|
||||
import com.ycwl.basic.handler.NestedMapTypeHandler;
|
||||
import lombok.Data;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
@@ -50,11 +50,12 @@ public class VideoReviewEntity {
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 机位快速评价JSON
|
||||
* 格式: {"角度":5,"清晰度":4,"构图":5}
|
||||
* 机位评价JSON
|
||||
* 格式: {"12345": {"清晰度":5,"构图":4,"色彩":5,"整体效果":4}, "12346": {...}}
|
||||
* 外层key为机位ID,内层Map为该机位的各维度评分
|
||||
*/
|
||||
@TableField(typeHandler = MapTypeHandler.class, jdbcType = JdbcType.VARCHAR)
|
||||
private Map<String, Integer> cameraPositionRating;
|
||||
@TableField(typeHandler = NestedMapTypeHandler.class, jdbcType = JdbcType.VARCHAR)
|
||||
private Map<String, Map<String, Integer>> cameraPositionRating;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
||||
Reference in New Issue
Block a user