You've already forked FrameTour-BE
- 在 ZTSourceMessage DTO 中新增 posJson 字段 - 更新数据库插入语句以支持 posJson 字段存储 - 调整日志输出内容,突出关键业务标识 - 在数据服务层增加对 posJson 的处理逻辑
65 lines
1.4 KiB
Java
65 lines
1.4 KiB
Java
package com.ycwl.basic.dto;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import lombok.Data;
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* ZT-Source Kafka消息实体
|
|
* 用于接收素材数据(照片和视频片段)
|
|
*
|
|
* @author system
|
|
* @date 2024/12/27
|
|
*/
|
|
@Data
|
|
public class ZTSourceMessage {
|
|
@JsonProperty("sourceId")
|
|
private Long sourceId;
|
|
|
|
@JsonProperty("sourceType")
|
|
private Integer sourceType;
|
|
|
|
@JsonProperty("scenicId")
|
|
private Long scenicId;
|
|
|
|
@JsonProperty("deviceId")
|
|
private Long deviceId;
|
|
|
|
@JsonProperty("shootTime")
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
private Date shootTime;
|
|
|
|
@JsonProperty("thumbnailUrl")
|
|
private String thumbnailUrl;
|
|
|
|
@JsonProperty("sourceUrl")
|
|
private String sourceUrl;
|
|
|
|
@JsonProperty("resolution")
|
|
private String resolution;
|
|
|
|
@JsonProperty("faceSampleId")
|
|
private Long faceSampleId;
|
|
|
|
@JsonProperty("posJson")
|
|
private String posJson;
|
|
|
|
/**
|
|
* 判断是否为视频片段
|
|
*/
|
|
public boolean isVideo() {
|
|
return sourceType != null && sourceType == 1;
|
|
}
|
|
|
|
/**
|
|
* 判断是否为照片
|
|
*/
|
|
public boolean isPhoto() {
|
|
return sourceType != null && sourceType == 2;
|
|
}
|
|
|
|
} |