rwadurian/backend/services/planting-service/src/infrastructure/external
hailin 24a46521f3 fix(planting-service): 修复跨服务调用使用错误标识符导致的500错误
问题根源:
- getBalance 调用使用 userId.toString() (纯数字如 "14")
- wallet-service 按 accountSequence 查找钱包失败后尝试创建新钱包
- 但 userId 已存在,触发唯一约束冲突导致500错误

修复内容:
1. planting-application.service.ts:
   - createOrder: getBalance(userId.toString()) → getBalance(accountSequence)
   - payOrder: getBalance(userId.toString()) → getBalance(walletIdentifier)

2. payment-compensation.service.ts:
   - 注入 IPlantingOrderRepository 获取订单的 accountSequence
   - handleUnfreeze/handleRetryConfirm 添加 accountSequence 参数

3. wallet-service.client.ts:
   - ensureRegionAccounts 接口添加 provinceTeamAccount/cityTeamAccount 字段

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 01:48:22 -08:00
..
authorization-service.client.ts feat(withdrawal): implement withdrawal order and fund allocation system 2025-12-09 02:35:27 -08:00
identity-service.client.ts fix(planting-service): 修复 identity-service 响应解析 2025-12-25 08:47:43 -08:00
index.ts feat(withdrawal): implement withdrawal order and fund allocation system 2025-12-09 02:35:27 -08:00
referral-service.client.ts refactor!: 重构账户序列号格式 (BREAKING CHANGE) 2025-12-12 09:11:18 -08:00
wallet-service.client.ts fix(planting-service): 修复跨服务调用使用错误标识符导致的500错误 2025-12-26 01:48:22 -08:00