Merge pull request 'by Robin at 20240422' (#316) from dev-feat-IRONFANS-70-Robin into feat-IRONFANS-70
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/316
This commit is contained in:
commit
71ccf53d70
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue