refactor: 消除重复的 normalizeAccountIDList,补充 PR#754 新增组件的单元测试

- 删除 account_today_stats_cache.go 中重复的 normalizeAccountIDList,统一使用 id_list_utils.go 的 normalizeInt64IDList
- 新增 snapshot_cache_test.go:覆盖 snapshotCache、buildETagFromAny、parseBoolQueryWithDefault
- 新增 id_list_utils_test.go:覆盖 normalizeInt64IDList、buildAccountTodayStatsBatchCacheKey
- 新增 ops_query_mode_test.go:覆盖 shouldFallbackOpsPreagg、cloneOpsFilterWithMode
This commit is contained in:
shaw
2026-03-04 15:22:46 +08:00
parent 9dcd3cd491
commit 0819c8a51a
5 changed files with 252 additions and 22 deletions

View File

@@ -1403,7 +1403,7 @@ func (h *AccountHandler) GetBatchTodayStats(c *gin.Context) {
return
}
accountIDs := normalizeAccountIDList(req.AccountIDs)
accountIDs := normalizeInt64IDList(req.AccountIDs)
if len(accountIDs) == 0 {
response.Success(c, gin.H{"stats": map[string]any{}})
return