为数据库dsn增加时区

This commit is contained in:
徐俊杰 2023-03-31 14:08:44 +08:00
parent 943bce15cd
commit 917b61de02

View File

@ -170,13 +170,11 @@ func (a *ArtistInfoUserProvider) GetUserMsg(ctx context.Context, req *artistInfo
func (a *ArtistInfoUserProvider) BindInviteInvitedAccount(ctx context.Context, in *artistInfoUser.BindInviteInvitedAccountRequest) (res *artistInfoUser.BindInviteInvitedAccountRespond, err error) {
// 查询被邀请人是否存在
var invitedUser model.User
if in.InvitedUserId == 0 {
if err = db.DB.Debug().Where("invited_code = ? OR id = ?", in.InvitedCode, in.InvitedUserId).First(&invitedUser).Error; err != nil {
if err == gorm.ErrRecordNotFound {
return nil, errors.New("被邀请人不存在")
} else {
return nil, err
}
if err = db.DB.Debug().Where("invited_code = ? OR id = ?", in.InvitedCode, in.InvitedUserId).First(&invitedUser).Error; err != nil {
if err == gorm.ErrRecordNotFound {
return nil, errors.New("被邀请人不存在")
} else {
return nil, err
}
}
// 查询邀请人是否存在