This commit is contained in:
laodaming
2023-10-16 11:16:39 +08:00
parent 2e421a2968
commit ce413c494c
2 changed files with 17 additions and 2 deletions

View File

@@ -79,3 +79,7 @@ func (m *FsUserInfoModel) GetProfile(ctx context.Context, pkey string, userId in
}
return info, nil
}
func (m *FsUserInfoModel) FindOneByUser(ctx context.Context, userId, guestId int64) (resp *FsUserInfo, err error) {
err = m.db.WithContext(ctx).Model(&FsUserInfo{}).Where("user_id = ? and guest_id = ?", userId, guestId).Take(&resp).Error
return resp, err
}