PostgreSQL 的 upsert 在高并发下仍可能出现唯一约束错误, 添加 try-catch 捕获 P2002 错误,发生冲突时直接查询返回已存在的记录。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| application | ||
| config | ||
| domain | ||
| infrastructure | ||
| shared | ||
| app.module.ts | ||
| main.ts | ||