From fca319958029fa924308e50cb61202d7d6ff5008 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期三, 19 二月 2025 13:33:37 +0800
Subject: [PATCH] 暂停聚集模型

---
 db/db.go |  188 +++++++++++++++++++++++-----------------------
 1 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/db/db.go b/db/db.go
index 6e78684..9ab8704 100644
--- a/db/db.go
+++ b/db/db.go
@@ -57,15 +57,15 @@
 // InitDefaultData 鍒濆鍖栨暟鎹�
 func InitDefaultData() error {
 	var models = []*Model{
-		{
-			BaseModel: BaseModel{
-				ID: ModelIdGather,
-			},
-			Name:        "鐤戜技鑱氶泦",
-			Description: "閫氱敤鑱氶泦妯″瀷",
-			Version:     "v1.0.2",
-			Enabled:     false,
-		},
+		//{
+		//	BaseModel: BaseModel{
+		//		ID: ModelIdGather,
+		//	},
+		//	Name:        "鐤戜技鑱氶泦",
+		//	Description: "閫氱敤鑱氶泦妯″瀷",
+		//	Version:     "v1.0.2",
+		//	Enabled:     false,
+		//},
 		{
 			BaseModel: BaseModel{
 				ID: ModelIdDisappear,
@@ -112,74 +112,74 @@
 	}
 
 	var rules = []*ModelRule{
-		{
-			Id:      "bfbdba7f-ee39-41fb-b188-b4c114a51eaa",
-			ModelId: ModelIdGather,
-			Scope:   "",
-			RuleArg: RuleArg{
-				Alias:    "gatherPersons",
-				Name:     "鑱氶泦浜烘暟",
-				Type:     "input",
-				Must:     true,
-				Unit:     "浜�",
-				Range:    "1,100",
-				Value:    "2",
-				ValType:  "int",
-				Operator: ">=",
-				Sort:     0,
-			},
-		},
-		{
-			Id:      "941bef84-ff7f-4460-b5dc-2ac6060304a4",
-			ModelId: ModelIdGather,
-			Scope:   "",
-			RuleArg: RuleArg{
-				Alias:    "appearInterval",
-				Name:     "鍑虹幇闂撮殧",
-				Type:     "input",
-				Must:     true,
-				Unit:     "绉�",
-				Range:    "1,7200",
-				Value:    "60",
-				ValType:  "int",
-				Operator: ">=",
-				Sort:     1,
-			},
-		},
-		{
-			Id:      "a9b50bae-2c40-40a1-9ebc-ac34850db964",
-			ModelId: ModelIdGather,
-			Scope:   "",
-			RuleArg: RuleArg{
-				Alias:    "threshold",
-				Name:     "鍑虹幇娆℃暟",
-				Type:     "input",
-				Must:     true,
-				Unit:     "娆�",
-				Range:    "1,60",
-				Value:    "1",
-				ValType:  "int",
-				Operator: ">=",
-				Sort:     2,
-			},
-		},
-		{
-			Id:      "aed7f95e-1ce6-4fa2-b1b3-aaf59ed86c50",
-			ModelId: ModelIdGather,
-			Scope:   "",
-			RuleArg: RuleArg{
-				Alias:    "daysWindow",
-				Name:     "鐩戞帶鏃堕棿",
-				Type:     "input",
-				Must:     true,
-				Unit:     "澶╁唴",
-				Range:    "1,7",
-				Value:    "1",
-				ValType:  "int",
-				Operator: "==",
-				Sort:     3,
-			},
-		},
+		//{
+		//	Id:      "bfbdba7f-ee39-41fb-b188-b4c114a51eaa",
+		//	ModelId: ModelIdGather,
+		//	Scope:   "",
+		//	RuleArg: RuleArg{
+		//		Alias:    "gatherPersons",
+		//		Name:     "鑱氶泦浜烘暟",
+		//		Type:     "input",
+		//		Must:     true,
+		//		Unit:     "浜�",
+		//		Range:    "1,100",
+		//		Value:    "2",
+		//		ValType:  "int",
+		//		Operator: ">=",
+		//		Sort:     0,
+		//	},
+		//},
+		//{
+		//	Id:      "941bef84-ff7f-4460-b5dc-2ac6060304a4",
+		//	ModelId: ModelIdGather,
+		//	Scope:   "",
+		//	RuleArg: RuleArg{
+		//		Alias:    "appearInterval",
+		//		Name:     "鍑虹幇闂撮殧",
+		//		Type:     "input",
+		//		Must:     true,
+		//		Unit:     "绉�",
+		//		Range:    "1,7200",
+		//		Value:    "60",
+		//		ValType:  "int",
+		//		Operator: ">=",
+		//		Sort:     1,
+		//	},
+		//},
+		//{
+		//	Id:      "a9b50bae-2c40-40a1-9ebc-ac34850db964",
+		//	ModelId: ModelIdGather,
+		//	Scope:   "",
+		//	RuleArg: RuleArg{
+		//		Alias:    "threshold",
+		//		Name:     "鍑虹幇娆℃暟",
+		//		Type:     "input",
+		//		Must:     true,
+		//		Unit:     "娆�",
+		//		Range:    "1,60",
+		//		Value:    "1",
+		//		ValType:  "int",
+		//		Operator: ">=",
+		//		Sort:     2,
+		//	},
+		//},
+		//{
+		//	Id:      "aed7f95e-1ce6-4fa2-b1b3-aaf59ed86c50",
+		//	ModelId: ModelIdGather,
+		//	Scope:   "",
+		//	RuleArg: RuleArg{
+		//		Alias:    "daysWindow",
+		//		Name:     "鐩戞帶鏃堕棿",
+		//		Type:     "input",
+		//		Must:     true,
+		//		Unit:     "澶╁唴",
+		//		Range:    "1,7",
+		//		Value:    "1",
+		//		ValType:  "int",
+		//		Operator: "==",
+		//		Sort:     3,
+		//	},
+		//},
 
 		// 鎵樼
 		{
@@ -241,15 +241,15 @@
 			Scope:   "",
 			RuleArg: RuleArg{
 				Alias:    "duration",
-				Name:     "鏃堕棿娈�",
+				Name:     "鐩戞帶鏃堕棿",
 				Type:     "input",
-				Must:     false,
-				Unit:     "澶�",
-				Range:    "1,2400",
+				Must:     true,
+				Unit:     "澶╁唴",
+				Range:    "1,60",
 				Value:    "30",
 				ValType:  "int",
-				Operator: ">=",
-				Sort:     2,
+				Operator: "==",
+				Sort:     1,
 			},
 		},
 		{
@@ -257,16 +257,16 @@
 			ModelId: ModelIdLocationAnalysis,
 			Scope:   "",
 			RuleArg: RuleArg{
-				Alias:    "personCount",
-				Name:     "鍑虹幇浜烘暟",
-				Type:     "input",
+				Alias:    "timeRange",
+				Name:     "鍑虹幇鏃堕棿",
+				Type:     "range",
 				Must:     true,
-				Unit:     "涓�",
-				Range:    "1,100",
-				Value:    "1, 90",
+				Unit:     "鐐�",
+				Range:    "0,23",
+				Value:    "9,10",
 				ValType:  "int",
-				Operator: ">=",
-				Sort:     0,
+				Operator: "==",
+				Sort:     2,
 			},
 		},
 		{
@@ -278,12 +278,12 @@
 				Name:     "鍑虹幇娆℃暟",
 				Type:     "input",
 				Must:     true,
-				Unit:     "",
+				Unit:     "娆�",
 				Range:    "",
 				Value:    "",
 				ValType:  "int",
 				Operator: ">=",
-				Sort:     1,
+				Sort:     0,
 			},
 		},
 
@@ -353,7 +353,7 @@
 				Value:    "",
 				ValType:  "string",
 				Operator: "==",
-				Options: "[{\"label\":\"杩沑", \"value\":\"in\"},{\"label\":\"鍑篭", \"value\":\"out\"}]",
+				Options:  "[{\"label\":\"杩沑", \"value\":\"in\"},{\"label\":\"鍑篭", \"value\":\"out\"}]",
 				Sort:     3,
 			},
 		},

--
Gitblit v1.8.0