feat(api): add cursor-based pagination for system messages
- Add SystemMessageCursorPageResponse DTO for cursor pagination - Implement GetSystemMessagesByCursor handler method - Add GetByReceiverIDCursor repository method with cursor decoding - Maintain backward compatibility with existing offset-based pagination
This commit is contained in:
@@ -528,6 +528,14 @@ type SystemUnreadCountResponse struct {
|
||||
UnreadCount int64 `json:"unread_count"`
|
||||
}
|
||||
|
||||
// SystemMessageCursorPageResponse 系统消息游标分页响应
|
||||
type SystemMessageCursorPageResponse struct {
|
||||
Items []*SystemMessageResponse `json:"items"`
|
||||
NextCursor string `json:"next_cursor"`
|
||||
PrevCursor string `json:"prev_cursor"`
|
||||
HasMore bool `json:"has_more"`
|
||||
}
|
||||
|
||||
// ==================== 时间格式化 ====================
|
||||
|
||||
// FormatTime 格式化时间
|
||||
|
||||
Reference in New Issue
Block a user