This commit is contained in:
eson 2023-08-30 11:07:47 +08:00
parent f52224024e
commit e5e51fc6d5

View File

@ -40,8 +40,8 @@ func (u *FsUserModel) FindUserById(ctx context.Context, Id int64) (resp FsUser,
return resp, err
}
func (u *FsUserModel) FindUserByGoogleId(ctx context.Context, Id int64) (resp *FsUser, err error) {
err = u.db.WithContext(ctx).Model(&FsUser{}).Where("`google_id` = ? and is_del = ?", Id, 0).Take(resp).Error
func (u *FsUserModel) FindUserByGoogleId(ctx context.Context, Id int64) (resp FsUser, err error) {
err = u.db.WithContext(ctx).Model(&FsUser{}).Where("`google_id` = ? and is_del = ?", Id, 0).Take(&resp).Error
return resp, err
}