feat: update
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user