fix-20231231-Robin-BUG0001 #28
|
@ -31,7 +31,7 @@ var ErrCodeMsgMap = map[ErrCode]string{
|
|||
ErrCodeLoginVeriCodeExpired: "验证码已过期",
|
||||
ErrCodeLoginAcctLocked: "登录账户尝试爆破登录,已被锁定",
|
||||
ErrCodeLoginAcctBanned: "登录账户已被封禁",
|
||||
ErrCodeLoginAcctNotEnabled: "登录账户未启用",
|
||||
ErrCodeLoginAcctNotEnabled: "登录账户未设置密码,请使用验证码登录",
|
||||
ErrCodeLoginNoChangeInAPswdReset: "新旧密码相同",
|
||||
ErrCodeLoginRegisterUserFail: "账号注册失败,请稍后重试",
|
||||
ErrCodeLoginWrongOldPswd: "旧密码错误",
|
||||
|
|
|
@ -31,6 +31,9 @@ type ApiListOthersVO struct {
|
|||
}
|
||||
|
||||
func (vo *ApiListVO) CopyAccount(account *dbstruct.Account) *ApiListVO {
|
||||
if account == nil {
|
||||
return vo
|
||||
}
|
||||
vo.Mid = account.Mid
|
||||
vo.Name = account.Name
|
||||
vo.UserId = account.UserId
|
||||
|
@ -48,6 +51,9 @@ func (vo *ApiListVO) CopyAccount(account *dbstruct.Account) *ApiListVO {
|
|||
}
|
||||
|
||||
func (vo *ApiListVO) CopyWallet(wallet *dbstruct.Wallet) *ApiListVO {
|
||||
if wallet == nil {
|
||||
return vo
|
||||
}
|
||||
vo.GoldNum = wallet.Coins
|
||||
vo.DiamondNum = wallet.Diamonds
|
||||
vo.WithdrawDiamondNum = wallet.WithdrawDiamonds
|
||||
|
@ -55,6 +61,9 @@ func (vo *ApiListVO) CopyWallet(wallet *dbstruct.Wallet) *ApiListVO {
|
|||
}
|
||||
|
||||
func (vo *ApiListOthersVO) CopyAccount(account *dbstruct.Account) *ApiListOthersVO {
|
||||
if account == nil {
|
||||
return vo
|
||||
}
|
||||
vo.Mid = account.Mid
|
||||
vo.Name = account.Name
|
||||
vo.UserId = account.UserId
|
||||
|
|
|
@ -30,6 +30,9 @@ type OpListOthersVO struct {
|
|||
}
|
||||
|
||||
func (vo *OpListVO) CopyAccount(account *dbstruct.Account) *OpListVO {
|
||||
if account == nil {
|
||||
return vo
|
||||
}
|
||||
vo.Mid = account.Mid
|
||||
vo.Name = account.Name
|
||||
vo.UserId = account.UserId
|
||||
|
@ -47,6 +50,9 @@ func (vo *OpListVO) CopyAccount(account *dbstruct.Account) *OpListVO {
|
|||
}
|
||||
|
||||
func (vo *OpListOthersVO) CopyAccount(account *dbstruct.Account) *OpListOthersVO {
|
||||
if account == nil {
|
||||
return vo
|
||||
}
|
||||
vo.Mid = account.Mid
|
||||
vo.Name = account.Name
|
||||
vo.UserId = account.UserId
|
||||
|
|
|
@ -13,6 +13,9 @@ type RealNameAuthenticationApiVO struct {
|
|||
}
|
||||
|
||||
func (p *RealNameAuthenticationApiVO) CopyRealNameAuthentication(realname_authentication *dbstruct.RealNameAuthentication) {
|
||||
if realname_authentication == nil {
|
||||
return
|
||||
}
|
||||
p.Status = util.DerefInt64(realname_authentication.Status)
|
||||
p.StautsDesc = consts.RealNameAuthenticationStatusDescMap[p.Status]
|
||||
p.Remarks = util.DerefString(realname_authentication.Remarks)
|
||||
|
|
|
@ -50,6 +50,9 @@ type OpListExtVO struct {
|
|||
}
|
||||
|
||||
func (vo *OpListExtVO) CopyAccount(account *dbstruct.Account) {
|
||||
if account == nil {
|
||||
return
|
||||
}
|
||||
vo.Name = account.Name
|
||||
vo.UserId = account.UserId
|
||||
vo.Avatar = account.Avatar
|
||||
|
@ -57,6 +60,9 @@ func (vo *OpListExtVO) CopyAccount(account *dbstruct.Account) {
|
|||
}
|
||||
|
||||
func (vo *OpListExtVO) CopyStreamer(streamer *dbstruct.Streamer) {
|
||||
if streamer == nil {
|
||||
return
|
||||
}
|
||||
vo.Id = streamer.Id
|
||||
vo.Mid = streamer.Mid
|
||||
vo.Gender = streamer.Gender
|
||||
|
@ -78,6 +84,9 @@ func (vo *OpListExtVO) CopyStreamer(streamer *dbstruct.Streamer) {
|
|||
}
|
||||
|
||||
func (vo *OpListExtVO) CopyPlatforms(platforms *[]*streamerlinkproto.StreamerLinkVO) {
|
||||
if platforms == nil {
|
||||
return
|
||||
}
|
||||
vo.Platforms = platforms
|
||||
}
|
||||
|
||||
|
@ -86,6 +95,9 @@ type OpListWxIdVO struct {
|
|||
}
|
||||
|
||||
func (vo *OpListWxIdVO) CopyStreamer(streamer *dbstruct.Streamer) {
|
||||
if streamer == nil {
|
||||
return
|
||||
}
|
||||
vo.Mid = streamer.Mid
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ func (vo *StreamerAuthApprovalApiVO) CopyStreamerAuthApproval(streamerauthapprov
|
|||
}
|
||||
|
||||
func (vo *StreamerAuthApprovalApiVO) CopyAccount(account *dbstruct.Account) *StreamerAuthApprovalApiVO {
|
||||
if account == nil {
|
||||
return vo
|
||||
}
|
||||
vo.UserId = account.UserId
|
||||
return vo
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@ func (vo *StreamerAuthApprovalOpVO) CopyStreamerAuthApproval(streamerauthapprova
|
|||
}
|
||||
|
||||
func (vo *StreamerAuthApprovalOpVO) CopyAccount(account *dbstruct.Account) *StreamerAuthApprovalOpVO {
|
||||
if account == nil {
|
||||
return vo
|
||||
}
|
||||
vo.UserId = account.UserId
|
||||
return vo
|
||||
}
|
||||
|
|
|
@ -18,6 +18,9 @@ func NewStreamerLinkVO() *StreamerLinkVO {
|
|||
}
|
||||
|
||||
func (vo *StreamerLinkVO) CopyStreamerLink(streamerlink *dbstruct.StreamerLink) *StreamerLinkVO {
|
||||
if streamerlink == nil {
|
||||
return vo
|
||||
}
|
||||
vo.Id = streamerlink.Id
|
||||
vo.Mid = streamerlink.Mid
|
||||
vo.LinkNo = streamerlink.LinkNo
|
||||
|
@ -32,6 +35,9 @@ func (vo *StreamerLinkVO) CopyStreamerLink(streamerlink *dbstruct.StreamerLink)
|
|||
}
|
||||
|
||||
func (vo *StreamerLinkVO) CopyPlatformCfg(platformCfg *apollostruct.PlatformCfg) *StreamerLinkVO {
|
||||
if platformCfg == nil {
|
||||
return vo
|
||||
}
|
||||
vo.Name = platformCfg.Name
|
||||
vo.Icon = platformCfg.Icon
|
||||
return vo
|
||||
|
|
Loading…
Reference in New Issue