fix: 统一商务表格展示并修正筛选和全量排序

This commit is contained in:
Yvan
2026-11-05 01:48:09 +08:00
parent dc97690eb1
commit 10600d1bc9
38 changed files with 356 additions and 145 deletions
+10
View File
@@ -6,6 +6,16 @@ import (
"time"
)
func TestGameIDSortDoesNotFallBackToRechargeAmount(t *testing.T) {
rows := []*AnalyticsRow{{AnalyticsKey: AnalyticsKey{ID: 20, SourceDB: "lx"}, Pay: "1.00"}, {AnalyticsKey: AnalyticsKey{ID: 3, SourceDB: "lx"}, Pay: "900.00"}}
if err := sortAnalytics(rows, GameAnalytics, "gameId", true); err != nil || rows[0].ID != 3 {
t.Fatal("game ID ascending sort failed")
}
if err := sortAnalytics(rows, GameAnalytics, "gameId", false); err != nil || rows[0].ID != 20 {
t.Fatal("game ID descending sort fell back to recharge amount")
}
}
type analyticsRepoFake struct {
data *AnalyticsData
scope AnalyticsScope