| | |
| | | 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] |
| | |
| | | PhoneNum: p.PhoneNum, |
| | | Sex: p.Sex, |
| | | TableId: p.TableId, |
| | | BwType: strconv.Itoa(int(p.BwType)), |
| | | TableName: p.TableName, |
| | | }) |
| | | } |
| | | vpE := CompareResult{ |
| | |
| | | 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 |