From c6976365d5bfb39a32db8b541b1fe3ceb30c7826 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期五, 14 二月 2025 10:03:17 +0800 Subject: [PATCH] Merge branch 'dev' --- ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java index be732c7..f005ce1 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/RecordMetaDSumResult.java @@ -3,6 +3,9 @@ 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; @@ -16,12 +19,16 @@ */ @Data @Document(collection = "uy_record_meta_d_sum") +@CompoundIndexes({ + //name锛氱储寮曞悕绉� def锛氬瓧娈�(1姝e簭 -1鍊掑簭) unique锛氭槸鍚﹀敮涓�绱㈠紩 + //鐩存帴鍔犲埌瀛楁涓婇潰娌$敤 + @CompoundIndex(name = "video_record", def = "{statTime:-1, no:1}") +}) public class RecordMetaDSumResult extends BaseResult { /** * 琛屾斂鍖哄煙鍚嶇О */ - @TextIndexed private String arealayername; /** @@ -43,7 +50,6 @@ /** * 鎽勫儚鏈哄悕绉� */ - @TextIndexed private String deviceName; /** @@ -59,7 +65,6 @@ /** * 鍥芥爣骞冲彴ID */ - @TextIndexed private String platId; /** @@ -81,6 +86,7 @@ * 缁熻鏃堕棿锛屾牸寮忎负鏃ユ湡瀛楃涓� */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Indexed(background = true) private Date statTime; /** -- Gitblit v1.8.0