by Robin at 20241217
This commit is contained in:
parent
2a4343553f
commit
50e3e76698
|
@ -105,6 +105,7 @@ type OpGetMobilePhoneByUserIdReq struct {
|
|||
|
||||
type OpGetMobilePhoneByUserIdData struct {
|
||||
MobilePhone string `json:"mobile_phone"`
|
||||
*OpListOthersVO
|
||||
}
|
||||
|
||||
type OpGetMobilePhoneByUserIdResp struct {
|
||||
|
|
|
@ -30,6 +30,10 @@ type OpListOthersVO struct {
|
|||
Role *int64 `json:"role" bson:"role"` // 角色
|
||||
}
|
||||
|
||||
func NewOpListOthersVO() *OpListOthersVO {
|
||||
return &OpListOthersVO{}
|
||||
}
|
||||
|
||||
func (vo *OpListVO) CopyAccount(account *dbstruct.Account) *OpListVO {
|
||||
if account == nil {
|
||||
return vo
|
||||
|
|
|
@ -991,7 +991,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
|
||||
|
||||
// 业务鉴权
|
||||
|
@ -1011,7 +1011,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
|
||||
|
|
Loading…
Reference in New Issue