From 7b7a194fda4f3c4f6233166adc5eee45b073a46f Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期四, 31 十月 2019 09:40:11 +0800 Subject: [PATCH] searchPhoto add AlarmRules --- controllers/fileController.go | 24 ++++++++++++++++++++++++ go.sum | 8 ++++---- go.mod | 4 ++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/controllers/fileController.go b/controllers/fileController.go index fadef57..3254db2 100644 --- a/controllers/fileController.go +++ b/controllers/fileController.go @@ -198,6 +198,7 @@ BaseInfo []DbPersonVo `json:"baseInfo"` VideoUrl string `json:"videoUrl"` SdkName string `json:"sdkName"` + AlarmRules []AlarmRuleVo `json:"alarmRules"` } type DbPersonVo struct { BwType string `json:"bwType"` @@ -217,6 +218,15 @@ type ScoreIndex struct { CompareScore float32 Index int +} + +type AlarmRuleVo struct { + GroupId string `json:"groupId"` + AlarmLevel string `json:"alarmLevel"` + RuleText string `json:"ruleText"` + DefenceState bool `json:"defenceState"` + IsLink bool `json:"isLink"` + LinkInfo string `json:"linkInfo"` } //濉厖鍚戝墠绔繑鍥炵殑鏁版嵁 @@ -304,6 +314,19 @@ TableName: p.TableName, }) } + var alarmRules []AlarmRuleVo + if vp.AlarmRules !=nil && len(vp.AlarmRules) >0 { + for _,ar :=range vp.AlarmRules { + alarmRules = append(alarmRules, AlarmRuleVo{ + GroupId: ar.GroupId, + AlarmLevel: ar.AlarmLevel, + RuleText: ar.RuleText, + DefenceState: ar.DefenceState, + IsLink: ar.IsLink, + LinkInfo: ar.LinkInfo, + }) + } + } vpE := CompareResult{ Id: vp.Id, CompareScore: util.ParseScore(captureM[vp.Id].CompareScore), @@ -321,6 +344,7 @@ VideoUrl: vp.VideoUrl, BaseInfo: bi, SdkName: "浜鸿劯", + AlarmRules: alarmRules, } resultList[captureM[vp.Id].Index] = vpE } diff --git a/go.mod b/go.mod index 3dc8464..b65db0b 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ basic.com/dbapi.git v0.0.0-20191030074447-274be55f401a // indirect basic.com/fileServer/WeedFSClient.git v0.0.0-20190919054037-0182b6c3f5cb // indirect basic.com/pubsub/cache.git v0.0.0-20190718093725-6a413e1d7d48 // indirect - basic.com/pubsub/esutil.git v0.0.0-20191029091908-d43f2d92ecb6 // indirect - basic.com/pubsub/protomsg.git v0.0.0-20190829113947-eb5a5f99a745 + basic.com/pubsub/esutil.git v0.0.0-20191031013312-2128f2f89a4b // indirect + basic.com/pubsub/protomsg.git v0.0.0-20191031013101-edd40582998e // indirect basic.com/valib/capture.git v0.0.0-20190924061718-7e98d8c98b3c // indirect basic.com/valib/deliver.git v0.0.0-20190531095353-25d8c3b20051 basic.com/valib/goffmpeg.git v0.0.0-20191024085028-080acae08ec8 // indirect diff --git a/go.sum b/go.sum index 2f2b06b..bf6e46e 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,10 @@ basic.com/fileServer/WeedFSClient.git v0.0.0-20190919054037-0182b6c3f5cb/go.mod h1:FTryK8BsVLfUplx8a3+l8hJWub6VbAWZCUH7sPRZaso= basic.com/pubsub/cache.git v0.0.0-20190718093725-6a413e1d7d48 h1:BBA30Rgljn6MRieC4gUncETJDyna3ObyubTo9HEQ2M0= basic.com/pubsub/cache.git v0.0.0-20190718093725-6a413e1d7d48/go.mod h1:gHLJZz2ee1cGL0X0ae69fs56bAxkDgEQwDhhXZJNUcY= -basic.com/pubsub/esutil.git v0.0.0-20191029091908-d43f2d92ecb6 h1:HNdnjoaOpLJvyNzUPD2Yx9tLsS7unR19O+0ZYviW2II= -basic.com/pubsub/esutil.git v0.0.0-20191029091908-d43f2d92ecb6/go.mod h1:yIvppFPFGC61DOdm71ujnsxZBMFUu2yKjr5O43bMWCw= -basic.com/pubsub/protomsg.git v0.0.0-20190829113947-eb5a5f99a745 h1:NQ/172pylwH5BnVwt4vlrXVN+UDn8YJc+5V2ZPaC4P0= -basic.com/pubsub/protomsg.git v0.0.0-20190829113947-eb5a5f99a745/go.mod h1:un5NV5VWQoblVLZfx1Rt5vyLgwR0jI92d3VJhfrJhWU= +basic.com/pubsub/esutil.git v0.0.0-20191031013312-2128f2f89a4b h1:Zou6YQlkM5lgeZ2p0XYQuVC4dUS9fONDBu2sc/Q4OW8= +basic.com/pubsub/esutil.git v0.0.0-20191031013312-2128f2f89a4b/go.mod h1:yIvppFPFGC61DOdm71ujnsxZBMFUu2yKjr5O43bMWCw= +basic.com/pubsub/protomsg.git v0.0.0-20191031013101-edd40582998e h1:/Rgz71+dMOa6Ge/TwwiasnZzP5WZ6LG7v9WbEsJQCxs= +basic.com/pubsub/protomsg.git v0.0.0-20191031013101-edd40582998e/go.mod h1:un5NV5VWQoblVLZfx1Rt5vyLgwR0jI92d3VJhfrJhWU= basic.com/valib/capture.git v0.0.0-20190924061718-7e98d8c98b3c h1:aNujtcGxq0cNLSK08cCamAiUYiQ2/ZsUMNXbX2w8Clc= basic.com/valib/capture.git v0.0.0-20190924061718-7e98d8c98b3c/go.mod h1:y+h7VUnoSQ3jOtf2K3twXNA8fYDfyUsifSswcyKLgNw= basic.com/valib/deliver.git v0.0.0-20190531095353-25d8c3b20051/go.mod h1:bkYiTUGzckyNOjAgn9rB/DOjFzwoSHJlruuWQ6hu6IY= -- Gitblit v1.8.0