fix: 统一商务表格展示并修正筛选和全量排序
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user