Files
no-whatever/src/app/api/blindbox/draw
kurihada b9a07f84c0 fix: 盲盒抽取使用事务 + 乐观锁防止并发抽到同一想法
- 将 findMany + update 包裹在 prisma.$transaction 中
- 使用 updateMany({ where: { id, status: "in_pool" } }) 保证原子性
- count=0 时返回 409 提示用户重试
2026-02-26 20:10:04 +08:00
..