问题:当 publishedAt 为 NULL(表示立即发布)时,Prisma 的
`publishedAt: { lte: now }` 条件不匹配,导致通知无法显示
修复:将查询条件改为 OR 逻辑:
- publishedAt 为 null(立即发布)
- publishedAt <= now(定时发布且已到时间)
影响的方法:
- findNotificationsForUser
- countUnreadForUser
- markAllAsRead
🤖 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/exceptions | ||
| types | ||
| app.module.ts | ||
| main.ts | ||