| | |
| | | //filename, err := service.UpdateSnapshotUrl(cid) |
| | | filename, err := service.UpdateCapture(cid) |
| | | if err != nil { |
| | | logger.Debug("UpdateSnapshotUrl.err:",err) |
| | | util.ResponseFormat(c, code.ComError, "更新失败") |
| | | return |
| | | } |
| | |
| | | //二次搜索和排序 |
| | | twiceM := GetCompareDataTwice(co,searchBody) |
| | | util.ResponseFormat(c,code.Success,twiceM) |
| | | return |
| | | } else { |
| | | m :=make(map[string]interface{},0) |
| | | m["compareNum"] = searchBody.CompareNum |
| | | m["total"] = 0 |
| | | m["totalList"] = []service.CompareResult{} |
| | | util.ResponseFormat(c,code.CompareResultGone,m) |
| | | return |
| | | } |
| | | } |
| | | m :=make(map[string]interface{},0) |
| | |
| | | } |
| | | var capturePersons []protomsg.Videopersons |
| | | if len(captureIds) >0 { |
| | | logger.Debug("comp capturePersons:", capturePersons) |
| | | logger.Debug("comp capturePersons.len:", len(capturePersons)) |
| | | videopersons, _ := esApi.Videopersonsinfosbyid(captureIds, config.EsInfo.EsIndex.VideoPersons.IndexName, config.EsInfo.Masterip, config.EsInfo.Httpport) |
| | | logger.Debug("comp videoPersons.len:",len(videopersons)) |
| | | for _,vp :=range videopersons { |
| | |
| | | CameraAddr: vp.CameraAddr, |
| | | PicDate: vp.PicDate, |
| | | PicMaxUrl: vp.PicMaxUrl, |
| | | PicSmUrl: []string{ vp.PicSmUrl }, |
| | | PicSmUrl: parsePicSmUrl(vp.PicSmUrl), |
| | | IsAlarm: isAlarmInt, |
| | | Sex: vp.Sex, |
| | | AgeDescription: vp.AgeDescription, |
| | |
| | | return resultList |
| | | } |
| | | |
| | | func parsePicSmUrl(picSmUrl string) []string { |
| | | if picSmUrl != ""{ |
| | | return []string{ picSmUrl } |
| | | } |
| | | return []string{} |
| | | } |
| | | |
| | | func parseMonitorLevel(level string) string { |
| | | if level == "1" { |
| | | return "一级" |