| | |
| | | package com.ycl.platform.domain.result.UY; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.platform.domain.result.BaseResult; |
| | | import lombok.Data; |
| | | import org.springframework.data.mongodb.core.index.CompoundIndex; |
| | | import org.springframework.data.mongodb.core.index.CompoundIndexes; |
| | | import org.springframework.data.mongodb.core.index.Indexed; |
| | | import org.springframework.data.mongodb.core.index.TextIndexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 录像可用性 |
| | |
| | | * @author gonghl |
| | | */ |
| | | @Data |
| | | public class RecordMetaDSumResult{ |
| | | @Document(collection = "uy_record_meta_d_sum") |
| | | @CompoundIndexes({ |
| | | //name:索引名称 def:字段(1正序 -1倒序) unique:是否唯一索引 |
| | | //直接加到字段上面没用 |
| | | @CompoundIndex(name = "video_record", def = "{statTime:-1, no:1}") |
| | | }) |
| | | public class RecordMetaDSumResult extends BaseResult { |
| | | |
| | | /** |
| | | * 行政区域名称 |
| | |
| | | /** |
| | | * 创建时间,格式为日期时间字符串 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | |
| | | private Integer recordStatus; |
| | | |
| | | /** |
| | | * 录像完整状态,1:完整,0:间歇,-1:异常 |
| | | */ |
| | | private String recordStatusText; |
| | | |
| | | /** |
| | | * 统计时间,格式为日期字符串 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Indexed(background = true) |
| | | private Date statTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | private String tenantId; |
| | | |
| | | public String getRecordStatusText() { |
| | | if (Objects.equals(recordStatus, 1)) { |
| | | recordStatusText = "完整"; |
| | | } |
| | | if (Objects.equals(recordStatus, 0)) { |
| | | recordStatusText = "间歇"; |
| | | } |
| | | if (Objects.equals(recordStatus, -1)) { |
| | | recordStatusText = "异常"; |
| | | } |
| | | return recordStatusText; |
| | | } |
| | | } |