fix: 完善同步生命周期并统一前端视觉

- 同步商品与订单时处理线上删除状态并联动自动化规则\n- 过滤卖家系统中的购买订单,修复订单逻辑删除与数据库迁移\n- 修复聊天新消息自动滚动,并统一前端颜色令牌与硬编码颜色检查
This commit is contained in:
Christ committed 2026-08-10 12:41:10 +08:00
1 parent cf76b8898b
commit 526ac44453
40 files changed
+802 -242

No files matched your search

+5 -1
View File
@@ -29,6 +29,7 @@ func TestMigrate_AppliesCleanSchema(t *testing.T) {
{"orders", "system_shipped"},
{"orders", "receiver_city"},
{"orders", "version"},
{"orders", "deleted_at"},
{"cards", "image_url"},
{"cards", "delay_seconds"},
{"keywords", "item_id"},
@@ -128,7 +129,7 @@ func TestLatestMigrationsDownUpSQLite(t *testing.T) {
}
goose.SetBaseFS(migrationsFS)
// 依次回滚最新版本到 13,再整体升级。
for i := 0; i < 13; i++ {
for i := 0; i < 14; i++ {
if err := goose.Down(d, "migrations/sqlite"); err != nil {
t.Fatalf("down migration #%d: %v", i+1, err)
}
@@ -151,6 +152,9 @@ func TestLatestMigrationsDownUpSQLite(t *testing.T) {
if columnExists(t, d, "item_info", "deleted_at") || columnExists(t, d, "automation_rules", "deleted_at") {
t.Fatal("soft-delete columns should be removed after migration 26 down")
}
if columnExists(t, d, "orders", "deleted_at") {
t.Fatal("orders.deleted_at should be removed after migration 27 down")
}
for _, table := range []string{"account_task_settings", "account_task_runs", "chat_sessions", "chat_messages"} {
if tableExists(t, d, table) {
t.Fatalf("table should be removed after migration 24 down: %s", table)