From 3898fd838546c35f70eb533d4cbc340e41b553d2 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期一, 05 八月 2019 19:38:09 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.14:10010/r/webserver

---
 controllers/fileController.go |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/controllers/fileController.go b/controllers/fileController.go
index 57798d0..9f05f67 100644
--- a/controllers/fileController.go
+++ b/controllers/fileController.go
@@ -180,12 +180,13 @@
 	Sex string `json:"sex"`
 	TableId string `json:"tableId"`
 	TableName string `json:"tableName"`
+	Enable int32 `json:"enable"`
 }
 
 type CompareSortResult []CompareResult
 
 func (s CompareSortResult) Len() int{
-	return s.Len()
+	return len(s)
 }
 func (s CompareSortResult) Swap(i,j int){
 	s[i],s[j] = s[j],s[i]
@@ -235,6 +236,7 @@
 				PhoneNum: p.PhoneNum,
 				Sex: p.Sex,
 				TableId: p.TableId,
+				Enable: p.Enable,
 			}
 			dbTableInfos, _ := esApi.Dbtablefosbyid([]string{p.TableId}, config.EsInfo.EsIndex.DbTables.IndexName, esServerIp, esServerPort)
 			if dbTableInfos !=nil{
@@ -264,6 +266,8 @@
 					PhoneNum: p.PhoneNum,
 					Sex: p.Sex,
 					TableId: p.TableId,
+					BwType: strconv.Itoa(int(p.BwType)),
+					TableName: p.TableName,
 				})
 			}
 			vpE := CompareResult{
@@ -389,13 +393,13 @@
 			for _,f1 :=range *totalData {
 				scorePre = append(scorePre, f1.CompareScore)
 			}
-			logger.Debug("comp 鎺掑簭鍓嶅垎鍊兼暟缁勶細",scorePre)
+			//logger.Debug("comp 鎺掑簭鍓嶅垎鍊兼暟缁勶細",scorePre)
 			sort.Sort(totalData)
 			var scoreAf []float32
 			for _,f2 :=range *totalData {
 				scoreAf = append(scoreAf, f2.CompareScore)
 			}
-			logger.Debug("comp 鎺掑簭鍚庡垎鍊兼暟缁勶細",scoreAf)
+			//logger.Debug("comp 鎺掑簭鍚庡垎鍊兼暟缁勶細",scoreAf)
 			total := totalData.Len()
 
 			m["compareNum"] = compareOnce.CompareNum
@@ -558,6 +562,9 @@
 	}
 	var rcFace *protomsg.Rect
 	if err ==nil && len(faceArr) >0 {
+		if len(faceArr) >1 {
+			return "",nil, errors.New("TooManyFaces")
+		}
 		for _,r := range faceArr {
 			//鎷垮埌浜鸿劯鐨勫潗鏍�
 			rcFace = r.Pos.RcFace
@@ -580,7 +587,6 @@
 		idx := strings.Index(field, "/")
 		field = field[idx+1:]
 	}
-	fmt.Println("field:",field)
 	ext := path.Ext(filename)
 	fileNameOnly := strings.TrimSuffix(filename, ext)
 

--
Gitblit v1.8.0