| | |
| | | |
| | | 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 |