feat: complete user bought medias

This commit is contained in:
yanghao05
2025-04-11 16:13:47 +08:00
parent 58f1e78054
commit 3a04c0b39d

View File

@@ -213,7 +213,7 @@ func (m *usersModel) PostList(ctx context.Context, userId int64, pagination *req
Cnt int64
}
stmtCnt := tblUserPosts.SELECT(COUNT(tbl.ID).AS("cnt")).WHERE(tblUserPosts.UserID.EQ(Int64(userId)))
stmtCnt := tblUserPosts.SELECT(COUNT(tblUserPosts.ID).AS("cnt")).WHERE(tblUserPosts.UserID.EQ(Int64(userId)))
m.log.Infof("sql: %s", stmtCnt.DebugSql())
if err := stmtCnt.QueryContext(ctx, db, &cnt); err != nil {