为数据库dsn增加时区
This commit is contained in:
parent
943bce15cd
commit
917b61de02
@ -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) {
|
func (a *ArtistInfoUserProvider) BindInviteInvitedAccount(ctx context.Context, in *artistInfoUser.BindInviteInvitedAccountRequest) (res *artistInfoUser.BindInviteInvitedAccountRespond, err error) {
|
||||||
// 查询被邀请人是否存在
|
// 查询被邀请人是否存在
|
||||||
var invitedUser model.User
|
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 = db.DB.Debug().Where("invited_code = ? OR id = ?", in.InvitedCode, in.InvitedUserId).First(&invitedUser).Error; err != nil {
|
if err == gorm.ErrRecordNotFound {
|
||||||
if err == gorm.ErrRecordNotFound {
|
return nil, errors.New("被邀请人不存在")
|
||||||
return nil, errors.New("被邀请人不存在")
|
} else {
|
||||||
} else {
|
return nil, err
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 查询邀请人是否存在
|
// 查询邀请人是否存在
|
||||||
|
Loading…
Reference in New Issue
Block a user