feat: 添加购买记录分页功能
Some checks failed
build quyun / Build (push) Failing after 1m24s

This commit is contained in:
2025-12-20 23:34:59 +08:00
parent 661a595fa7
commit 1aab961b8d

View File

@@ -115,6 +115,8 @@ func (m *posts) Bought(ctx context.Context, userId int64, pagination *requests.P
RightJoin(tblUserPost, tbl.ID.EqCol(tblUserPost.PostID)). RightJoin(tblUserPost, tbl.ID.EqCol(tblUserPost.PostID)).
Where(tblUserPost.UserID.Eq(userId)). Where(tblUserPost.UserID.Eq(userId)).
Order(tblUserPost.CreatedAt.Desc()). Order(tblUserPost.CreatedAt.Desc()).
Limit(int(pagination.Limit)).
Offset(int(pagination.Offset())).
Scan(&retItems) Scan(&retItems)
if err != nil { if err != nil {
return nil, err return nil, err