diff --git a/api/proto/zone_collaborator/proto/zone_collaborator_vo_api.go b/api/proto/zone_collaborator/proto/zone_collaborator_vo_api.go index 917f0ef2..7344f3c6 100644 --- a/api/proto/zone_collaborator/proto/zone_collaborator_vo_api.go +++ b/api/proto/zone_collaborator/proto/zone_collaborator_vo_api.go @@ -1,8 +1,11 @@ package proto -import "service/dbstruct" +import ( + accountproto "service/api/proto/account/proto" + "service/dbstruct" +) type ZoneCollaboratorApiVO struct { *dbstruct.ZoneCollaborator - *dbstruct.Account `json:"collaborator_account"` + Account *accountproto.ApiListOthersVO `json:"collaborator_account"` } diff --git a/api/proto/zone_third_partner/proto/zone_third_partner_vo_api.go b/api/proto/zone_third_partner/proto/zone_third_partner_vo_api.go index 18e57ddc..120e5c02 100644 --- a/api/proto/zone_third_partner/proto/zone_third_partner_vo_api.go +++ b/api/proto/zone_third_partner/proto/zone_third_partner_vo_api.go @@ -1,8 +1,11 @@ package proto -import "service/dbstruct" +import ( + accountproto "service/api/proto/account/proto" + "service/dbstruct" +) type ZoneThirdPartnerApiVO struct { *dbstruct.ZoneThirdPartner - *dbstruct.Account `json:"third_partner_account"` + Account *accountproto.ApiListOthersVO `json:"third_partner_account"` } diff --git a/app/mix/controller/zone_collaborator_api.go b/app/mix/controller/zone_collaborator_api.go index db01d079..56451264 100644 --- a/app/mix/controller/zone_collaborator_api.go +++ b/app/mix/controller/zone_collaborator_api.go @@ -69,6 +69,9 @@ func ApiGetZoneCollaboratorList(ctx *gin.Context) { mediaFillableList[i] = media.Account.Avatar } mediafiller.FillList(ctx, mediaFillableList) + if ztpVO != nil && ztpVO.Account != nil && ztpVO.Account.Avatar != nil { + mediafiller.FillEntity(ctx, ztpVO.Account.Avatar) + } data := &zone_collaborator_proto.ApiListData{ List: list, diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index bff9a265..2524d2cd 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -3013,7 +3013,7 @@ func (s *Service) ApiGetZoneThirdPartnerList(ctx *gin.Context, req *zone_third_p return } - account, err := _DefaultAccount.OpListByMid(ctx, &accountproto.OpListByMidReq{ + acct, err := _DefaultAccount.OpListByMid(ctx, &accountproto.OpListByMidReq{ Mid: zoneThirdPartner.ThirdPartnerMid, }) if err != nil { @@ -3021,15 +3021,17 @@ func (s *Service) ApiGetZoneThirdPartnerList(ctx *gin.Context, req *zone_third_p ec = errcode.ErrCodeAccountSrvFail return } - if account == nil { + if acct == nil { logger.Error("No account entity was found, req: %v", util.ToJson(req)) ec = errcode.ErrCodeAccountNotExist return } + acctVO := &accountproto.ApiListOthersVO{} + acctVO.CopyAccount(acct) vo = &zone_third_partner_proto.ZoneThirdPartnerApiVO{ ZoneThirdPartner: zoneThirdPartner, - Account: account, + Account: acctVO, } return @@ -3133,9 +3135,11 @@ func (s *Service) ApiGetZoneCollaboratorList(ctx *gin.Context, req *zone_collabo for _, zone_collaborator := range list { mid := zone_collaborator.GetCollaboratorMid() + acctVO := &accountproto.ApiListOthersVO{} + acctVO.CopyAccount(acctMp[mid]) vo := &zone_collaborator_proto.ZoneCollaboratorApiVO{ ZoneCollaborator: zone_collaborator, - Account: acctMp[mid], + Account: acctVO, } volist = append(volist, vo) } @@ -3154,7 +3158,7 @@ func (s *Service) ApiGetZoneCollaboratorList(ctx *gin.Context, req *zone_collabo return } - account, err := _DefaultAccount.OpListByMid(ctx, &accountproto.OpListByMidReq{ + acct, err := _DefaultAccount.OpListByMid(ctx, &accountproto.OpListByMidReq{ Mid: zoneThirdPartner.ThirdPartnerMid, }) if err != nil { @@ -3162,15 +3166,17 @@ func (s *Service) ApiGetZoneCollaboratorList(ctx *gin.Context, req *zone_collabo ec = errcode.ErrCodeAccountSrvFail return } - if account == nil { + if acct == nil { logger.Error("No account entity was found, req: %v", util.ToJson(req)) ec = errcode.ErrCodeAccountNotExist return } + acctVO := &accountproto.ApiListOthersVO{} + acctVO.CopyAccount(acct) ztpVO = &zone_third_partner_proto.ZoneThirdPartnerApiVO{ ZoneThirdPartner: zoneThirdPartner, - Account: account, + Account: acctVO, } return