From 75c6f6fea50b977cb72a50f4609a5cbbbf235c35 Mon Sep 17 00:00:00 2001 From: sunty <suntianyu0923@163.com> Date: 星期一, 29 七月 2019 10:07:56 +0800 Subject: [PATCH] delete analyServerId omitempty --- service/FaceCompareService.go | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/service/FaceCompareService.go b/service/FaceCompareService.go index dcbad3c..d9598bc 100644 --- a/service/FaceCompareService.go +++ b/service/FaceCompareService.go @@ -83,7 +83,7 @@ Content string `json:"content"` IsAlarm int `json:"isAlarm"` PicMaxUrl string `json:"picMaxUrl"` - PicSmUrl string `json:"picSmUrl"` + PicSmUrl []string `json:"picSmUrl"` Sex string `json:"sex"` AgeDescription string `json:"ageDescription"` Race string `json:"race"` @@ -91,6 +91,7 @@ TaskName string `json:"taskName"` BaseInfo []DbPersonVo `json:"baseInfo"` VideoUrl string `json:"videoUrl"` + SdkName string `json:"sdkName"` } type DbPersonVo struct { BwType string `json:"bwType"` @@ -206,13 +207,13 @@ logger.Debug("videoPersons.len:",len(videopersons)) for _,vp :=range videopersons { isAlarmInt, _ := strconv.Atoi(vp.IsAlarm) - var bi []DbPersonVo + bi := make([]DbPersonVo,0) for _,p :=range vp.BaseInfo { bi = append(bi, DbPersonVo{ PersonId: p.PersonId, IdCard: p.IdCard, CompareScore: util.ParseScore(p.CompareScore), - MonitorLevel: p.MonitorLevel, + MonitorLevel: parseMonitorLevel(p.MonitorLevel), PersonName: p.PersonName, PersonPicUrl: p.PersonPicUrl, PhoneNum: p.PhoneNum, @@ -227,7 +228,7 @@ CameraAddr: vp.CameraAddr, PicDate: vp.PicDate, PicMaxUrl: vp.PicMaxUrl, - PicSmUrl: vp.PicSmUrl, + PicSmUrl: []string{ vp.PicSmUrl }, IsAlarm: isAlarmInt, Sex: vp.Sex, AgeDescription: vp.AgeDescription, @@ -236,9 +237,23 @@ TaskId: vp.TaskId, VideoUrl: vp.VideoUrl, BaseInfo: bi, + SdkName: "浜鸿劯", } resultList = append(resultList,vpE) } } return resultList } + +func parseMonitorLevel(level string) string { + if level == "1" { + return "涓�绾�" + } + if level == "2" { + return "浜岀骇" + } + if level == "3" { + return "涓夌骇" + } + return level +} \ No newline at end of file -- Gitblit v1.8.0