feat: fix issues

This commit is contained in:
Rogee
2025-05-26 12:25:55 +08:00
parent 51ed5685dc
commit d634e0175b
10 changed files with 43 additions and 17 deletions

View File

@@ -85,7 +85,7 @@ func (m *UserPosts) BatchDelete(ctx context.Context, ids []int64) error {
func (m *UserPosts) Update(ctx context.Context) error {
m.UpdatedAt = time.Now()
stmt := tblUserPosts.UPDATE(tblUserPostsUpdateMutableColumns).SET(m).WHERE(tblUserPosts.ID.EQ(Int(m.ID))).RETURNING(tblUserPosts.AllColumns)
stmt := tblUserPosts.UPDATE(tblUserPostsUpdateMutableColumns).MODEL(m).WHERE(tblUserPosts.ID.EQ(Int(m.ID))).RETURNING(tblUserPosts.AllColumns)
m.log().WithField("func", "Update").Info(stmt.DebugSql())
if err := stmt.QueryContext(ctx, db, m); err != nil {