- 新增 000071 数据库迁移:notifications 表支持 distribution_site_id 并自动回填历史分销订单通知 - 通知自动归属:在事务内根据订单或申诉自动关联当前分销站点 ID - 隔离查询与已读控制:列表、未读统计与批量已读均严格按站点隔离,防止主站与分站交叉泄漏 - 前台界面联动:消息中心通知 Tab 及移动端/PC端站内信页面展示分站专属标识与精准过滤
28 lines
777 B
Go
28 lines
777 B
Go
package notification
|
|
|
|
import "time"
|
|
|
|
type NotificationDTO struct {
|
|
ID uint64 `json:"id"`
|
|
UserID uint64 `json:"user_id"`
|
|
Type string `json:"type"`
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
BizType string `json:"biz_type"`
|
|
BizID *uint64 `json:"biz_id"`
|
|
DistributionSiteID *uint64 `json:"distribution_site_id,omitempty"`
|
|
ReadAt *time.Time `json:"read_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type PaginatedResult struct {
|
|
Items interface{} `json:"items"`
|
|
Total int64 `json:"total"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"page_size"`
|
|
}
|
|
|
|
type UnreadCountDTO struct {
|
|
UnreadCount int64 `json:"unread_count"`
|
|
}
|