Merge branch 'feat-IRONFANS-1000063-Robin' into conf-1000063

This commit is contained in:
Robin 2024-12-17 13:38:06 +08:00
commit 708d110069
3 changed files with 7 additions and 2 deletions

View File

@ -105,6 +105,7 @@ type OpGetMobilePhoneByUserIdReq struct {
type OpGetMobilePhoneByUserIdData struct {
MobilePhone string `json:"mobile_phone"`
*OpListOthersVO
}
type OpGetMobilePhoneByUserIdResp struct {

View File

@ -38,6 +38,10 @@ func NewOpListOthersVO() *OpListOthersVO {
return &OpListOthersVO{}
}
func NewOpListOthersVO() *OpListOthersVO {
return &OpListOthersVO{}
}
func (vo *OpListVO) CopyAccount(account *dbstruct.Account) *OpListVO {
if account == nil {
return vo

View File

@ -1026,7 +1026,7 @@ func (s *Service) OpGetAccountListByUserId(ctx *gin.Context, req *accountproto.O
return
}
func (s *Service) OpGetMobilePhoneByUserId(ctx *gin.Context, req *accountproto.OpGetMobilePhoneByUserIdReq) (mobilePhone string, ec errcode.ErrCode) {
func (s *Service) OpGetMobilePhoneByUserId(ctx *gin.Context, req *accountproto.OpGetMobilePhoneByUserIdReq) (mobilePhone string, vo *accountproto.OpListOthersVO, ec errcode.ErrCode) {
ec = errcode.ErrCodeAccountSrvOk
// 业务鉴权
@ -1046,7 +1046,7 @@ func (s *Service) OpGetMobilePhoneByUserId(ctx *gin.Context, req *accountproto.O
base64DecryptedBytes, _ := base64.StdEncoding.DecodeString(util.DerefString(account.MobilePhone))
phoneBytes, _ := mycrypto.CryptoServiceInstance().AES.Decrypt(base64DecryptedBytes)
mobilePhone = string(phoneBytes)
vo = accountproto.NewOpListOthersVO().CopyAccount(account)
}
return