rwadurian/backend/services/admin-service/prisma/migrations
hailin a11e4d0261 fix(pre-planting): 修复 5 个预种模块 Bug + 补全 3 服务 migration
Bug #1 (HIGH): allocateFunds 从 Prisma 事务内移到事务外
  - pre-planting-reward.service.ts: distributeRewards 拆为
    prepareAndPersistRewards(事务内持久化)+ executeAllocations(事务后转账)
  - pre-planting-application.service.ts: 事务后调用 executeAllocations

Bug #2 (HIGH): signContract 后触发 hasPlanted
  - 签约事务成功后发布 PlantingOrderPaid 到 planting-events topic
  - wallet-service 消费后执行 markUserAsPlanted + settleUserPendingRewards
  - event-publisher.service.ts: 新增 publishRawToPlantingEvents 方法

Bug #3 (MEDIUM): PENDING 推荐奖励改为全部 SETTLED
  - 与现有认种行为对齐,推荐奖励立即发放

Bug #4 (HIGH): 补全 3 个服务的数据库迁移文件
  - planting-service: 4 张预种表(orders/positions/merges/reward_entries)
  - admin-service: 1 张配置表(pre_planting_configs)+ 默认数据
  - contribution-service: 4 张 CDC 追踪表(synced_orders/positions/freeze_states/processed_cdc_events)

Bug #5 (LOW): 合并循环 if→while,支持一次购买多份触发多次合并

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:09:14 -08:00
..
20250102100000_init refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
20250102200000_add_notifications feat(notification): 添加通知中心功能 2025-12-14 20:45:03 -08:00
20250102300000_add_system_config chore: 提交所有未提交的修改 2025-12-19 06:09:43 -08:00
20250107100000_add_referral_query_view feat(admin-service): 添加 referral-service CDC 数据同步 2026-01-07 18:57:58 -08:00
20250107120000_add_cdc_query_views feat(admin-service): 添加 CDC 分类账流水同步 2026-01-07 19:29:27 -08:00
20250108100000_add_benefit_assessment_query_view feat(admin-service): 添加 BenefitAssessmentRecord CDC 同步 2026-01-08 04:22:37 -08:00
20250120100000_add_user_query_view fix(admin-service): 添加 user_query_view 等表的迁移文件 2025-12-20 02:37:11 -08:00
20250124100000_add_user_profile_system chore(db): 添加用户画像系统数据库迁移 2025-12-24 16:43:19 -08:00
20251227100000_add_system_maintenance_and_co_managed_wallet chore(admin-service): 添加系统维护和共管钱包的数据库迁移 2025-12-27 23:36:42 -08:00
20260204100000_add_app_assets feat(app-assets): 应用图片管理 — 开屏图/引导图可从 admin-web 配置 2026-02-04 11:20:26 -08:00
20260205100000_add_customer_service_contacts feat(customer-service): 客服联系方式从硬编码改为后台可配置 2026-02-05 05:00:25 -08:00
20260205120000_add_contract_batch_download feat(contracts): 合同管理功能 - 查询/下载/批量打包 2026-02-05 22:50:17 -08:00
20260223000000_add_pre_planting_config fix(pre-planting): 修复 5 个预种模块 Bug + 补全 3 服务 migration 2026-02-23 18:09:14 -08:00
migration_lock.toml refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00