Merge pull request 'feat-IRONFANS-70' (#398) from feat-IRONFANS-70 into main

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/398
This commit is contained in:
chenhao 2024-05-01 04:19:24 +08:00
commit f0c60326b8
14 changed files with 295 additions and 103 deletions

View File

@ -179,6 +179,7 @@ var ErrCodeMsgMap = map[ErrCode]string{
ErrCodeZoneMomentNotExist: "私密圈动态不存在",
ErrCodePaidZoneMomentCreateTimesReachedUpperbound: "付费动态不能多于免费动态",
ErrCodeZoneMomentImagesNotEnoughForEncryption: "预览图片数不得大于等于上传图片数",
ErrCodeZoneMomentStatusNotPublic: "私密圈动态状态不为公开!",
ErrCodeZoneMomentThumbsUpSrvFail: "私密圈点赞服务错误",
ErrCodeZoneMomentThumbsUpNotExist: "私密圈点赞不存在",
@ -455,6 +456,7 @@ const (
ErrCodeZoneMomentNotExist ErrCode = -34002 // 私密圈动态不存在
ErrCodePaidZoneMomentCreateTimesReachedUpperbound ErrCode = -34003 // 私密圈付费动态创建次数已达上限
ErrCodeZoneMomentImagesNotEnoughForEncryption ErrCode = -34004 // 私密圈图片贴图片数量少于可预览图片数
ErrCodeZoneMomentStatusNotPublic ErrCode = -34005 // 私密圈动态非公开状态
// ZoneMomentThumbsUp: 35xxx
ErrCodeZoneMomentThumbsUpSrvOk ErrCode = ErrCodeOk

View File

@ -0,0 +1,10 @@
package proto
import "service/library/validator"
func (p *ApiUpdateReq) ProvideNotNullValue() (params []*validator.JsonParam) {
params = make([]*validator.JsonParam, 0)
params = append(params, validator.NewInt64PtrParam("请填写空间id", p.Zone.Id))
return
}

View File

@ -0,0 +1,10 @@
package proto
import "service/library/validator"
func (p *OpUpdateReq) ProvideNotNullValue() (params []*validator.JsonParam) {
params = make([]*validator.JsonParam, 0)
params = append(params, validator.NewInt64PtrParam("请填写空间表id", p.Zone.Id))
return
}

View File

@ -37,6 +37,12 @@ type OpDeleteResp struct {
type OpUpdateReq struct {
base.BaseRequest
*dbstruct.Zone
AdmissionPrice int64 `json:"admission_price"` // 空间解锁价格, 单位: 分
IronfanshipPrice int64 `json:"ironfanship_price"` // 铁粉解锁价格, 单位: 分
IsSuperfanshipEnabled int `json:"is_superfanship_enabled"` // 是否开启超粉空间 0: 关闭, 1: 开启
SuperfanshipPrice int64 `json:"superfanship_price"` // 超粉价格, 单位: 分
SuperfanshipValidPeriod int `json:"superfanship_valid_period"` // 超粉有效期类型, SuperfanshipValidPeriod*
IsSuperfanshipGiveWechat int `json:"is_superfanship_give_wechat"` // 是否开启超粉空间赠送微信 0: 不赠送, 1: 赠送
}
type OpUpdateData struct {
@ -55,9 +61,9 @@ type OpListReq struct {
}
type OpListData struct {
List []*dbstruct.Zone `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
List []*OpZoneVO `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type OpListResp struct {

View File

@ -2,21 +2,23 @@ package proto
import (
streamerproto "service/api/proto/streamer/proto"
zone_collaborator_proto "service/api/proto/zone_collaborator/proto"
zone_third_partner_proto "service/api/proto/zone_third_partner/proto"
"service/bizcommon/util"
"service/dbstruct"
)
type OpZoneVO struct {
*dbstruct.Zone
AdmissionPrice int64 `json:"admission_price" bson:"admission_price"` // 空间解锁价格, 单位: 分
IronfanshipPrice int64 `json:"ironfanship_price" bson:"ironfanship_price"` // 铁粉解锁价格, 单位: 分
IsSuperfanshipEnabled int `json:"is_superfanship_enabled" bson:"is_superfanship_enabled"` // 是否开启超粉空间 0: 关闭, 1: 开启
SuperfanshipPrice int64 `json:"superfanship_price" bson:"superfanship_price"` // 超粉价格, 单位: 分
SuperfanshipValidPeriod int `json:"superfanship_valid_period" bson:"superfanship_valid_period"` // 超粉有效期类型, SuperfanshipValidPeriod*
IsSuperfanshipGiveWechat int `json:"is_superfanship_give_wechat" bson:"is_superfanship_give_wechat"` // 是否开启超粉空间赠送微信 0: 不赠送, 1: 赠送
StreamerExt *streamerproto.OpListExtVO `json:"streamer_ext"` // 主播信息
ZoneThirdPartner *dbstruct.ZoneThirdPartner `json:"zone_third_partner"` // 代运营
ZoneCollaboratorList []*dbstruct.ZoneCollaborator `json:"zone_collaborator_list"` // 协作者
AdmissionPrice int64 `json:"admission_price" bson:"admission_price"` // 空间解锁价格, 单位: 分
IronfanshipPrice int64 `json:"ironfanship_price" bson:"ironfanship_price"` // 铁粉解锁价格, 单位: 分
IsSuperfanshipEnabled int `json:"is_superfanship_enabled" bson:"is_superfanship_enabled"` // 是否开启超粉空间 0: 关闭, 1: 开启
SuperfanshipPrice int64 `json:"superfanship_price" bson:"superfanship_price"` // 超粉价格, 单位: 分
SuperfanshipValidPeriod int `json:"superfanship_valid_period" bson:"superfanship_valid_period"` // 超粉有效期类型, SuperfanshipValidPeriod*
IsSuperfanshipGiveWechat int `json:"is_superfanship_give_wechat" bson:"is_superfanship_give_wechat"` // 是否开启超粉空间赠送微信 0: 不赠送, 1: 赠送
StreamerExt *streamerproto.OpListExtVO `json:"streamer_ext"` // 主播信息
ZoneThirdPartner *zone_third_partner_proto.ZoneThirdPartnerApiVO `json:"zone_third_partner"` // 代运营
ZoneCollaboratorList []*zone_collaborator_proto.ZoneCollaboratorApiVO `json:"zone_collaborator_list"` // 协作者
}
func (vo *OpZoneVO) GetMid() int64 {

View File

@ -75,3 +75,12 @@ func (p *OpHeadReq) ProvideNotNullValue() (params []*validator.JsonParam) {
return
}
func (p *OpSetPrivateReq) ProvideNotNullValue() (params []*validator.JsonParam) {
params = make([]*validator.JsonParam, 0)
params = append(params, validator.NewInt64PtrParam("请确认待审批动态的id", p.ZoneMomentId))
params = append(params, validator.NewStringParam("请确认人工审批意见!", p.ManuallyReviewOpinion))
return
}

View File

@ -209,3 +209,18 @@ type OpHeadResp struct {
base.BaseResponse
Data *OpHeadData `json:"data"`
}
// op 退回动态
type OpSetPrivateReq struct {
base.BaseRequest
ZoneMomentId *int64 `json:"zone_moment_id"`
ManuallyReviewOpinion string `json:"manually_review_opinion"`
}
type OpSetPrivateData struct {
}
type OpSetPrivateResp struct {
base.BaseResponse
Data *OpSetPrivateData `json:"data"`
}

View File

@ -509,6 +509,7 @@ func Init(r *gin.Engine) {
opZoneMomentGroup.POST("list_by_user_id", middleware.JSONParamValidator(zonemomentproto.OpListByUserIdReq{}), middleware.JwtAuthenticator(), OpGetZoneMomentListByUserId)
opZoneMomentGroup.POST("review", middleware.JSONParamValidator(zonemomentproto.OpReviewReq{}), middleware.JwtAuthenticator(), OpReviewZoneMoment)
opZoneMomentGroup.POST("head", middleware.JSONParamValidator(zonemomentproto.OpHeadReq{}), middleware.JwtAuthenticator(), OpHeadZoneMoment)
opZoneMomentGroup.POST("set_private", middleware.JSONParamValidator(zonemomentproto.OpSetPrivateReq{}), middleware.JwtAuthenticator(), OpSetPrivateZoneMoment)
// 视频审核callback
extVideoModerationGroup := r.Group("/ext/video_moderation")

View File

@ -135,3 +135,15 @@ func OpHeadZoneMoment(ctx *gin.Context) {
ReplyOk(ctx, nil)
}
func OpSetPrivateZoneMoment(ctx *gin.Context) {
req := ctx.MustGet("client_req").(*zonemomentproto.OpSetPrivateReq)
ec := service.DefaultService.OpSetPrivateZoneMoment(ctx, req)
if ec != errcode.ErrCodeZoneMomentSrvOk {
logger.Error("OpSetPrivateZoneMoment fail, req: %v, ec: %v", util.ToJson(req), ec)
ReplyErrCodeMsg(ctx, ec)
return
}
ReplyOk(ctx, nil)
}

View File

@ -2653,49 +2653,6 @@ func (s *Service) ApiDeleteZoneMoment(ctx *gin.Context, req *zonemomentproto.Api
return
}
// 查看空间最后更新时间是否需要回退
list, err := _DefaultZoneMoment.OpListByMid(ctx, &zonemomentproto.OpListByMidReq{
BaseRequest: req.BaseRequest,
Limit: 1,
Sort: []string{"-ut"},
})
if err != nil {
logger.Error("OpListByMid fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
// 已经没有动态最后更新时间回退到0
if len(list) == 0 {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: goproto.Int64(0),
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
} else {
//还有动态,看最后一条更新的动态的更新时间是否比删除的那条动态更早,若更早,则需要把空间的更新时间回拨
lastzonemoment := list[0]
if lastzonemoment.GetUt() < zonemoment.GetUt() {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: lastzonemoment.Ut,
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
}
}
// 回退空间内统计总数,只回退公开的情况
if zonemoment.GetStatus() == consts.ZoneMoment_Public {
mediaCountInc := len(zonemoment.MediaComp.GetImageIds())
@ -2716,6 +2673,52 @@ func (s *Service) ApiDeleteZoneMoment(ctx *gin.Context, req *zonemomentproto.Api
ec = errcode.ErrCodeZoneMomentSrvFail
}
// 查看空间最后更新时间是否需要回退
if zonemoment.GetStatus() == consts.ZoneMoment_Public {
list, err := _DefaultZoneMoment.OpListByMid(ctx, &zonemomentproto.OpListByMidReq{
BaseRequest: req.BaseRequest,
Status: goproto.Int64(consts.ZoneMoment_Public),
Limit: 1,
Sort: []string{"-ut"},
})
if err != nil {
logger.Error("OpListByMid fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
// 已经没有动态最后更新时间回退到0
if len(list) == 0 {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: goproto.Int64(0),
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
} else {
//还有动态,看最后一条更新的动态的更新时间是否比删除的那条动态更早,若更早,则需要把空间的更新时间回拨
lastzonemoment := list[0]
if lastzonemoment.GetUt() < zonemoment.GetUt() {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: lastzonemoment.Ut,
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
}
}
}
return
}

View File

@ -37,6 +37,7 @@ func (p *Zone) OpCreate(ctx *gin.Context, req *zoneproto.OpCreateReq) (error, in
req.Zone.Ct = goproto.Int64(time.Now().Unix())
req.Zone.Ut = goproto.Int64(time.Now().Unix())
req.Zone.DelFlag = goproto.Int64(consts.Exist)
req.Zone.LastZoneMomentCt = goproto.Int64(0)
err = p.store.CreateZone(ctx, req.Zone)
if err != nil {
logger.Error("CreateZone fail, err: %v", err)

View File

@ -75,7 +75,7 @@ func (p *ZoneMoment) OpList(ctx *gin.Context, req *zonemomentproto.OpListReq) ([
func (p *ZoneMoment) GetById(ctx *gin.Context, id int64) (*dbstruct.ZoneMoment, error) {
zonemoment, err := p.store.GetZoneMomentById(ctx, id)
if err != nil {
logger.Error("GetZoneMomentList fail, err: %v", err)
logger.Error("GetZoneMomentById fail, err: %v", err)
return &dbstruct.ZoneMoment{}, err
}
return zonemoment, nil

View File

@ -3181,6 +3181,26 @@ func (s *Service) OpUpdateZone(ctx *gin.Context, req *zoneproto.OpUpdateReq) (ec
ec = errcode.ErrCodeZoneSrvFail
return
}
err = _DefaultVas.UpdateZoneVasInfo(ctx, &vasproto.UpdateZoneVasReq{
ZoneVas: &dbstruct.ZoneVas{
Zid: *req.Zone.Id,
Mid: req.BaseRequest.Mid,
Ct: time.Now().Unix(),
Ut: time.Now().Unix(),
AdmissionPrice: req.AdmissionPrice,
IronfanshipPrice: req.IronfanshipPrice,
IsSuperfanshipEnabled: req.IsSuperfanshipEnabled,
SuperfanshipPrice: req.SuperfanshipPrice,
SuperfanshipValidPeriod: req.SuperfanshipValidPeriod,
IsSuperfanshipGiveWechat: req.IsSuperfanshipGiveWechat,
},
})
if err != nil {
logger.Error("UpdateZoneVasInfo fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeZoneSrvFail
return
}
return
}
@ -3195,7 +3215,7 @@ func (s *Service) OpDeleteZone(ctx *gin.Context, id int64) (ec errcode.ErrCode)
return
}
func (s *Service) OpGetZoneList(ctx *gin.Context, req *zoneproto.OpListReq) (list []*dbstruct.Zone, ec errcode.ErrCode) {
func (s *Service) OpGetZoneList(ctx *gin.Context, req *zoneproto.OpListReq) (volist []*zoneproto.OpZoneVO, ec errcode.ErrCode) {
ec = errcode.ErrCodeZoneSrvOk
list, err := _DefaultZone.OpList(ctx, req)
if err != nil {
@ -3203,6 +3223,15 @@ func (s *Service) OpGetZoneList(ctx *gin.Context, req *zoneproto.OpListReq) (lis
ec = errcode.ErrCodeZoneSrvFail
return
}
// 填充必要信息
volist, err = s.utilFillZonesWithOpVOInfo(ctx, list)
if err != nil {
logger.Error("utilFillZonesWithOpVOInfo fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeZoneSrvFail
return
}
return
}
@ -3396,49 +3425,6 @@ func (s *Service) OpDeleteZoneMoment(ctx *gin.Context, req *zonemomentproto.OpDe
return
}
// 查看空间最后更新时间是否需要回退
list, err := _DefaultZoneMoment.OpListByMid(ctx, &zonemomentproto.OpListByMidReq{
BaseRequest: req.BaseRequest,
Limit: 1,
Sort: []string{"-ut"},
})
if err != nil {
logger.Error("OpListByMid fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
// 已经没有动态最后更新时间回退到0
if len(list) == 0 {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: goproto.Int64(0),
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
} else {
//还有动态,看最后一条更新的动态的更新时间是否比删除的那条动态更早,若更早,则需要把空间的更新时间回拨
lastzonemoment := list[0]
if lastzonemoment.GetUt() < zonemoment.GetUt() {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: lastzonemoment.Ut,
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
}
}
// 回退空间内统计总数,只回退公开的情况
if zonemoment.GetStatus() == consts.ZoneMoment_Public {
mediaCountInc := len(zonemoment.MediaComp.GetImageIds())
@ -3451,6 +3437,52 @@ func (s *Service) OpDeleteZoneMoment(ctx *gin.Context, req *zonemomentproto.OpDe
}
}
// 查看空间最后更新时间是否需要回退
if zonemoment.GetStatus() == consts.ZoneMoment_Public {
list, err := _DefaultZoneMoment.OpListByMid(ctx, &zonemomentproto.OpListByMidReq{
BaseRequest: req.BaseRequest,
Status: goproto.Int64(consts.ZoneMoment_Public),
Limit: 1,
Sort: []string{"-ut"},
})
if err != nil {
logger.Error("OpListByMid fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
// 已经没有动态最后更新时间回退到0
if len(list) == 0 {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: goproto.Int64(0),
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
} else {
//还有动态,看最后一条更新的动态的更新时间是否比删除的那条动态更早,若更早,则需要把空间的更新时间回拨
lastzonemoment := list[0]
if lastzonemoment.GetUt() < zonemoment.GetUt() {
err = _DefaultZone.OpUpdateByIdAndLastZoneMomentCt(ctx, &zoneproto.OpUpdateReq{
Zone: &dbstruct.Zone{
Id: goproto.Int64(zid),
LastZoneMomentCt: lastzonemoment.Ut,
},
}, zone.GetLastZoneMomentCt())
if err != nil {
logger.Error("OpUpdate fail, err: %v", err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
}
}
}
return
}
@ -3601,7 +3633,7 @@ func (s *Service) OpHeadZoneMoment(ctx *gin.Context, req *zonemomentproto.OpHead
// 更新动态的状态
err := _DefaultZoneMoment.OpHeadByIds(ctx, req.ZoneMomentIds, req.OpType)
if err != nil {
logger.Error("_DefaultZoneMoment OpIncPriorityByIds fail, req: %v, err: %v", util.ToJson(req), err)
logger.Error("_DefaultZoneMoment OpHeadByIds fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
@ -3609,6 +3641,53 @@ func (s *Service) OpHeadZoneMoment(ctx *gin.Context, req *zonemomentproto.OpHead
return
}
func (s *Service) OpSetPrivateZoneMoment(ctx *gin.Context, req *zonemomentproto.OpSetPrivateReq) (ec errcode.ErrCode) {
ec = errcode.ErrCodeZoneMomentSrvOk
// 保证动态的状态都是公开的
zonemoment, err := _DefaultZoneMoment.GetById(ctx, util.DerefInt64(req.ZoneMomentId))
if err != nil {
logger.Error("_DefaultZoneMoment GetById fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
if zonemoment == nil {
ec = errcode.ErrCodeZoneMomentNotExist
return
}
if zonemoment.GetStatus() != consts.ZoneMoment_Public {
ec = errcode.ErrCodeZoneMomentStatusNotPublic
return
}
// 更新动态的状态
err = _DefaultZoneMoment.OpUpdate(ctx, &zonemomentproto.OpUpdateReq{
ZoneMoment: &dbstruct.ZoneMoment{
Id: req.ZoneMomentId,
Status: goproto.Int64(consts.ZoneMoment_Private),
ManuallyReviewStatus: goproto.Int64(consts.ZoneMomentManuallyReview_Rejected),
ManuallyReviewOpinion: goproto.String(req.ManuallyReviewOpinion),
},
})
if err != nil {
logger.Error("_DefaultZoneMoment OpUpdate fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeZoneMomentSrvFail
return
}
// 回退空间内统计总数
mediaCountInc := len(zonemoment.MediaComp.GetImageIds())
videoCountInc := len(zonemoment.MediaComp.GetVideoIds())
err = _DefaultZone.RecordStatisticsById(ctx, zonemoment.GetZid(), -1, -int64(mediaCountInc), -int64(videoCountInc))
if err != nil {
logger.Error("RecordStatisticsById fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeZoneSrvFail
return
}
return
}
// ZoneThirdPartner
func (s *Service) OpCreateZoneThirdPartner(ctx *gin.Context, req *zone_third_partner_proto.OpCreateReq) (ec errcode.ErrCode) {
ec = errcode.ErrCodeZoneThirdPartnerSrvOk

View File

@ -18,6 +18,8 @@ import (
textaudittaskproto "service/api/proto/textaudittask/proto"
thumbsupproto "service/api/proto/thumbsup/proto"
zoneproto "service/api/proto/zone/proto"
zone_collaborator_proto "service/api/proto/zone_collaborator/proto"
zone_third_partner_proto "service/api/proto/zone_third_partner/proto"
zonemomentproto "service/api/proto/zonemoment/proto"
zonemomentthumbsupproto "service/api/proto/zonemomentthumbsup/proto"
"service/apollostruct"
@ -1776,6 +1778,31 @@ func (s *Service) utilFillZonesWithOpVOInfo(ctx *gin.Context, list []*dbstruct.Z
return
}
// 5.获取账户信息
midSet = make(map[int64]*dbstruct.Zone)
mids = make([]int64, 0)
for _, ztp := range ztpMp {
mid := ztp.GetThirdPartnerMid()
if midSet[mid] == nil {
midSet[mid] = &dbstruct.Zone{}
mids = append(mids, mid)
}
}
for _, zclist := range zcMp {
for _, zc := range zclist {
mid := zc.GetCollaboratorMid()
if midSet[mid] == nil {
midSet[mid] = &dbstruct.Zone{}
mids = append(mids, mid)
}
}
}
acctMp, err := _DefaultAccount.GetAccountMapByMids(ctx, mids)
if err != nil {
logger.Error("GetAccountMapByMids fail, req: %v, err: %v", err)
return
}
// 8.获取空间付费信息
zvMap, _ := _DefaultVas.GetZoneVasByIds(ctx, zids)
@ -1788,10 +1815,25 @@ func (s *Service) utilFillZonesWithOpVOInfo(ctx *gin.Context, list []*dbstruct.Z
vo.CopyStreamerExt(streamerExtMap[vo.GetMid()])
// 填充代运营
vo.ZoneThirdPartner = ztpMp[zid]
ztp := ztpMp[zid]
ztpAcctVO := &accountproto.ApiListOthersVO{}
ztpAcctVO.CopyAccount(acctMp[ztp.GetThirdPartnerMid()])
vo.ZoneThirdPartner = &zone_third_partner_proto.ZoneThirdPartnerApiVO{
ZoneThirdPartner: ztp,
Account: ztpAcctVO,
}
// 填充协作者
vo.ZoneCollaboratorList = zcMp[zid]
zclist := zcMp[zid]
vo.ZoneCollaboratorList = make([]*zone_collaborator_proto.ZoneCollaboratorApiVO, 0)
for _, zc := range zclist {
zcAcctVO := &accountproto.ApiListOthersVO{}
zcAcctVO.CopyAccount(acctMp[zc.GetCollaboratorMid()])
vo.ZoneCollaboratorList = append(vo.ZoneCollaboratorList, &zone_collaborator_proto.ZoneCollaboratorApiVO{
ZoneCollaborator: zc,
Account: zcAcctVO,
})
}
if zv, ok := zvMap[zid]; ok {
vo.CopyZoneVas(zv)