From 0ea2815ff30489781880fb48f1b9a748c44e091e Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 01 八月 2019 11:40:59 +0800
Subject: [PATCH] test

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

diff --git a/controllers/fileController.go b/controllers/fileController.go
index a8dde46..9284697 100644
--- a/controllers/fileController.go
+++ b/controllers/fileController.go
@@ -369,10 +369,20 @@
 
 		logger.Debug("comp 姣斿缁撴潫锛岀敤鏃讹細",time.Since(timeStart))
 		m := make(map[string]interface{},3)
-		if totalData!=nil && len(*totalData) > 0{
+		if totalData != nil && totalData.Len() > 0{
 			//鎸夊垎鍊兼帓搴�
+			var scorePre []float32
+			for _,f1 :=range *totalData {
+				scorePre = append(scorePre, f1.CompareScore)
+			}
+			logger.Debug("comp 鎺掑簭鍓嶅垎鍊兼暟缁勶細",scorePre)
 			sort.Sort(totalData)
-			total := len(*totalData)
+			var scoreAf []float32
+			for _,f2 :=range *totalData {
+				scoreAf = append(scoreAf, f2.CompareScore)
+			}
+			logger.Debug("comp 鎺掑簭鍚庡垎鍊兼暟缁勶細",scoreAf)
+			total := totalData.Len()
 
 			m["compareNum"] = compareOnce.CompareNum
 			m["total"] = total

--
Gitblit v1.8.0