fix: 完成商务迁移复核与接口优化并清理历史资料

This commit is contained in:
Yvan
2026-11-04 14:45:02 +08:00
parent 5a96be6a79
commit 297e80827d
176 changed files with 6803 additions and 6002 deletions
+3 -3
View File
@@ -59,11 +59,11 @@ func TestActivationListsReadOAAndRestrictAccounts(t *testing.T) {
db, _, repo := prepareActivations(t)
ctx := context.Background()
accounts, err := repo.OwnAccounts(ctx, 7)
if err != nil || len(accounts) != 1 || accounts[0] != "Own" {
if err != nil || len(accounts) != 1 || accounts[0] != (business.ActivationAccount{SourceDB: "lx", Account: "Own"}) {
t.Fatalf("本人已通过账号范围错误: %+v %v", accounts, err)
}
page, err := repo.List(ctx, business.ActivationScope{Accounts: []string{"OWN"}}, business.ActivationFilter{})
if err != nil || page.Total != 2 || page.Rows[0].ID != 2 {
page, err := repo.List(ctx, business.ActivationScope{Accounts: []business.ActivationAccount{{SourceDB: "lx", Account: "OWN"}}}, business.ActivationFilter{})
if err != nil || page.Total != 1 || page.Rows[0].ID != 1 {
t.Fatalf("OA 列表或排序错误: %+v %v", page, err)
}
page, err = repo.List(ctx, business.ActivationScope{All: true}, business.ActivationFilter{PlatformNames: []string{"lx"}, Statuses: []string{"reached"}})