You've already forked FrameTour-BE
refactor(videoreview): 简化机位评价数据结构
- 修改机位评价数据结构从嵌套Map改为简单Map - 更新数据库映射文件中的类型处理器配置 - 调整评价统计逻辑以适应新的数据结构 - 优化导出功能以支持新格式的机位评价展示 - 更新相关实体类、DTO类及Mapper接口定义 - 移除不再使用的嵌套Map相关代码和依赖
This commit is contained in:
@@ -27,9 +27,8 @@ public class VideoReviewAddReqDTO {
|
||||
|
||||
/**
|
||||
* 机位评价JSON(可选)
|
||||
* 格式: {"12345": {"清晰度":5,"构图":4,"色彩":5,"整体效果":4}, "12346": {...}}
|
||||
* 外层key为机位ID,内层Map为该机位的各维度评分
|
||||
* 评分维度: 清晰度, 构图, 色彩, 整体效果
|
||||
* 格式: {"12345": 5, "12346": 4}
|
||||
* key为机位ID,value为该机位的评分(1-5)
|
||||
*/
|
||||
private Map<String, Map<String, Integer>> cameraPositionRating;
|
||||
private Map<String, Integer> cameraPositionRating;
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ public class VideoReviewRespDTO {
|
||||
|
||||
/**
|
||||
* 机位评价JSON
|
||||
* 格式: {"12345": {"清晰度":5,"构图":4,"色彩":5,"整体效果":4}, "12346": {...}}
|
||||
* 外层key为机位ID,内层Map为该机位的各维度评分
|
||||
* 格式: {"12345": 5, "12346": 4}
|
||||
* key为机位ID,value为该机位的评分(1-5)
|
||||
*/
|
||||
private Map<String, Map<String, Integer>> cameraPositionRating;
|
||||
private Map<String, Integer> cameraPositionRating;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
||||
@@ -40,8 +40,8 @@ public class VideoReviewStatisticsRespDTO {
|
||||
private List<ScenicReviewRank> scenicRankList;
|
||||
|
||||
/**
|
||||
* 机位评价维度统计
|
||||
* key: 维度名称, value: 平均分
|
||||
* 机位评价统计
|
||||
* key: 机位ID, value: 该机位的平均评分
|
||||
*/
|
||||
private Map<String, BigDecimal> cameraPositionAverage;
|
||||
|
||||
|
||||
@@ -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.NestedMapTypeHandler;
|
||||
import com.ycwl.basic.handler.MapTypeHandler;
|
||||
import lombok.Data;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
@@ -51,11 +51,11 @@ public class VideoReviewEntity {
|
||||
|
||||
/**
|
||||
* 机位评价JSON
|
||||
* 格式: {"12345": {"清晰度":5,"构图":4,"色彩":5,"整体效果":4}, "12346": {...}}
|
||||
* 外层key为机位ID,内层Map为该机位的各维度评分
|
||||
* 格式: {"12345": 5, "12346": 4}
|
||||
* key为机位ID,value为该机位的评分(1-5)
|
||||
*/
|
||||
@TableField(typeHandler = NestedMapTypeHandler.class, jdbcType = JdbcType.VARCHAR)
|
||||
private Map<String, Map<String, Integer>> cameraPositionRating;
|
||||
@TableField(typeHandler = MapTypeHandler.class, jdbcType = JdbcType.VARCHAR)
|
||||
private Map<String, Integer> cameraPositionRating;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
||||
Reference in New Issue
Block a user