Compare commits
No commits in common. "master" and "feature/fzy/hyt-express" have entirely different histories.
master
...
feature/fz
|
|
@ -368,13 +368,7 @@ func (b *BbxtTools) GetProfitRankingSum(now time.Time) (report *ReportRes, err e
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(data.List) == 0 {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
maxLen := 20
|
|
||||||
if len(data.List) < maxLen {
|
|
||||||
maxLen = len(data.List)
|
|
||||||
}
|
|
||||||
//排序
|
//排序
|
||||||
sort.Slice(data.List, func(i, j int) bool {
|
sort.Slice(data.List, func(i, j int) bool {
|
||||||
return data.List[i].HistoryOneDiff > data.List[j].HistoryOneDiff
|
return data.List[i].HistoryOneDiff > data.List[j].HistoryOneDiff
|
||||||
|
|
@ -382,7 +376,7 @@ func (b *BbxtTools) GetProfitRankingSum(now time.Time) (report *ReportRes, err e
|
||||||
//取前20和后20
|
//取前20和后20
|
||||||
var (
|
var (
|
||||||
total [][]string
|
total [][]string
|
||||||
top = data.List[:maxLen]
|
top = data.List[:20]
|
||||||
bottom = data.List[len(data.List)-20:]
|
bottom = data.List[len(data.List)-20:]
|
||||||
)
|
)
|
||||||
//合并前20和后20
|
//合并前20和后20
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue