| | |
| | | TableName string `json:"tableName"` |
| | | } |
| | | |
| | | type CompareSortResult []CompareResult |
| | | |
| | | func (s CompareSortResult) Len() int{ |
| | | return s.Len() |
| | | } |
| | | func (s CompareSortResult) Swap(i,j int){ |
| | | s[i],s[j] = s[j],s[i] |
| | | } |
| | | func (s CompareSortResult) Less(i,j int) bool{ |
| | | return s[i].CompareScore > s[j].CompareScore |
| | | } |
| | | |
| | | //填充向前端返回的数据 |
| | | func FillDataToCompareResult(compResult *protomsg.SdkCompareResult) []CompareResult { |
| | | resultList :=make([]CompareResult,0) |
| | | func FillDataToCompareResult(compResult *protomsg.SdkCompareResult) CompareSortResult { |
| | | //resultList :=make([]CompareResult,0) |
| | | var resultList = CompareSortResult{} |
| | | |
| | | dbPersonM := make(map[string]*protomsg.SdkCompareEach, 0) |
| | | captureM := make(map[string]*protomsg.SdkCompareEach, 0) |
| | |
| | | resultList = append(resultList,vpE) |
| | | } |
| | | } |
| | | sort.Sort(resultList) |
| | | return resultList |
| | | } |
| | | |