From 1e24626fa58f488f7744ce94e88a650f05c7a749 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 08 八月 2019 18:53:38 +0800
Subject: [PATCH] add log

---
 controllers/fileController.go |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/controllers/fileController.go b/controllers/fileController.go
index c666c93..8ebc80c 100644
--- a/controllers/fileController.go
+++ b/controllers/fileController.go
@@ -224,8 +224,7 @@
 		dbpersons, _ = esApi.Dbpersoninfosbyid(personIds, index, esServerIp, esServerPort)
 	}
 
-	logger.Debug("comp dbpersons.len:", len(dbpersons))
-	if dbpersons !=nil {
+	if len(dbpersons) >0 {
 		for _,p :=range dbpersons {
 			var dbP = DbPersonVo {
 				PersonId: p.Id,
@@ -292,7 +291,17 @@
 			resultList = append(resultList,vpE)
 		}
 	}
+	var scorePre []float32
+	for _,f1 :=range resultList {
+		scorePre = append(scorePre, f1.CompareScore)
+	}
+	logger.Debug("comp 鎺掑簭鍓嶅垎鍊兼暟缁勶細",scorePre)
 	sort.Sort(resultList)
+	var scoreAf []float32
+	for _,f2 :=range resultList {
+		scoreAf = append(scoreAf, f2.CompareScore)
+	}
+	logger.Debug("comp 鎺掑簭鍚庡垎鍊兼暟缁勶細",scoreAf)
 	return  resultList
 }
 
@@ -406,17 +415,17 @@
 	m := make(map[string]interface{},3)
 	if totalData != nil && totalData.Len() > 0{
 		//鎸夊垎鍊兼帓搴�
-		var scorePre []float32
-		for _,f1 :=range *totalData {
-			scorePre = append(scorePre, f1.CompareScore)
-		}
-		logger.Debug("comp 鎺掑簭鍓嶅垎鍊兼暟缁勶細",scorePre)
+		//var scorePre []float32
+		//for _,f1 :=range *totalData {
+		//	scorePre = append(scorePre, f1.CompareScore)
+		//}
+		//logger.Debug("comp 鎺掑簭鍓嶅垎鍊兼暟缁勶細",scorePre)
 		sort.Sort(totalData)
-		var scoreAf []float32
-		for _,f2 :=range *totalData {
-			scoreAf = append(scoreAf, f2.CompareScore)
-		}
-		logger.Debug("comp 鎺掑簭鍚庡垎鍊兼暟缁勶細",scoreAf)
+		//var scoreAf []float32
+		//for _,f2 :=range *totalData {
+		//	scoreAf = append(scoreAf, f2.CompareScore)
+		//}
+		//logger.Debug("comp 鎺掑簭鍚庡垎鍊兼暟缁勶細",scoreAf)
 		total := totalData.Len()
 
 		m["compareNum"] = compareOnce.CompareNum

--
Gitblit v1.8.0