Skip to content

Commit 5a524a7

Browse files
committed
🐛 修改排序问题
1 parent 588d3b7 commit 5a524a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin/chatcount/model.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,12 @@ func (a ByTotalTimeDescMessageDesc) Len() int {
209209
return len(a)
210210
}
211211

212-
// Less 实现 sort.Interface,按 TotalTime 降序,TotalMessage 降序
212+
// Less 实现 sort.Interface,按 TodayTime 降序,TodayMessage 降序
213213
func (a ByTotalTimeDescMessageDesc) Less(i, j int) bool {
214-
if a[i].TotalTime == a[j].TotalTime {
215-
return a[i].TotalMessage > a[j].TotalMessage
214+
if a[i].TodayTime == a[j].TodayTime {
215+
return a[i].TodayMessage > a[j].TodayMessage
216216
}
217-
return a[i].TotalTime > a[j].TotalTime
217+
return a[i].TodayTime > a[j].TodayTime
218218
}
219219

220220
// Swap 实现 sort.Interface

0 commit comments

Comments
 (0)