feat: update

This commit is contained in:
Rogee
2025-05-23 21:00:22 +08:00
parent f836fcc726
commit 92136a8093
2 changed files with 4 additions and 2 deletions

View File

@@ -27,13 +27,13 @@ func (m *Users) GetByID(ctx context.Context, id int64) (*Users, error) {
stmt := tbl.
SELECT(tbl.AllColumns).
WHERE(
tbl.ID.EQ(Int64(m.ID)),
tbl.ID.EQ(Int64(id)),
)
m.log().Infof("sql: %s", stmt.DebugSql())
var user Users
if err := stmt.QueryContext(ctx, db, &user); err != nil {
m.log().Errorf("error querying user by ID: %v", err)
m.log().Errorf("error querying user by ID(%d), err: %v", id, err)
return nil, err
}