rwadurian/backend/services/contribution-service
hailin 40ac037c03 fix(contribution): 修复系统账户查询中 nullable regionCode 的 TypeScript 类型错误
## 问题
- Prisma 生成的类型不允许在 unique where 条件中传递 null
- addContribution 方法被传入多余参数
- findByType 返回数组被当作单个对象使用

## 修复
- findByTypeAndRegion: 使用 findFirst 替代 findUnique
- ensureSystemAccountsExist: 使用 findFirst + create 替代 upsert
- addContribution: 使用 findFirst + create/update 替代 upsert
- 修正 HEADQUARTERS 账户同步事件调用参数

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:37:44 -08:00
..
prisma refactor(system-accounts): 移除 baseType 字段,使用 accountType+regionCode 复合唯一键 2026-01-20 21:29:01 -08:00
src fix(contribution): 修复系统账户查询中 nullable regionCode 的 TypeScript 类型错误 2026-01-20 21:37:44 -08:00
.env.example refactor(cdc): 统一使用 Debezium CDC 进行数据同步 2026-01-11 23:19:34 -08:00
DEVELOPMENT_GUIDE.md feat(contribution-service): 添加算力管理微服务 2026-01-10 17:39:25 -08:00
Dockerfile revert: restore original Dockerfiles 2026-01-12 10:12:16 -08:00
nest-cli.json feat(contribution-service): 添加算力管理微服务 2026-01-10 17:39:25 -08:00
package-lock.json feat(contribution-service): 添加算力管理微服务 2026-01-10 17:39:25 -08:00
package.json feat(contribution-service): 添加算力管理微服务 2026-01-10 17:39:25 -08:00
tsconfig.json feat(contribution-service): 添加算力管理微服务 2026-01-10 17:39:25 -08:00