From 3a04c0b39d2c2bf343185c439843a90e3e6181b1 Mon Sep 17 00:00:00 2001 From: yanghao05 Date: Fri, 11 Apr 2025 16:13:47 +0800 Subject: [PATCH] feat: complete user bought medias --- backend/app/models/users.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/models/users.go b/backend/app/models/users.go index c5ce636..c09123a 100644 --- a/backend/app/models/users.go +++ b/backend/app/models/users.go @@ -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 {