feat: 对接稿件审核通知系统 + 消息页面系统消息区域

- 新增通知类型 post_approved / post_rejected
- PostService.Approve/Reject 完成后通知作者(通知失败不影响主流程)
- NotificationService 新增 NotifyPostApproved/NotifyPostRejected 方法
- 消息页面顶部增加系统消息标识和分隔线,之下为全部消息列表
- 稿件审核通过通知卡片点击跳转到 /posts/{id} 页面
- 稿件审核拒绝通知卡片点击跳转到 /studio/posts 创作中心
- 新增 postNotifier 接口遵循 ISP 原则
This commit is contained in:
2026-05-30 21:24:30 +08:00
parent fb94ce60ae
commit 67444434b9
7 changed files with 148 additions and 17 deletions

View File

@ -53,4 +53,10 @@ type spaceUserStore interface {
// spacePostStore SpaceService 所需的最小帖子仓储接口ISP1 个方法)
type spacePostStore interface {
FindByUserID(userID uint, offset, limit int) ([]model.Post, int64, error)
}
// postNotifier PostService 所需的通知服务接口ISP2 个方法)
type postNotifier interface {
NotifyPostApproved(userID uint, postTitle string, postID uint)
NotifyPostRejected(userID uint, postTitle, reason string, postID uint)
}