by Robin at 20241121
This commit is contained in:
parent
660d636141
commit
1b3de32c39
|
@ -2472,6 +2472,10 @@ func (s *Service) ApiGetMomentListByIdsFromCreater(ctx *gin.Context, req *moment
|
|||
ec = errcode.ErrCodeZoneMomentSrvFail
|
||||
return
|
||||
}
|
||||
momentIds := make([]string, 0)
|
||||
for _, moment := range list {
|
||||
momentIds = append(momentIds, fmt.Sprint(moment.GetId()))
|
||||
}
|
||||
|
||||
// 2.通过mid获取主播信息map
|
||||
ignoreMap := make(map[string]bool)
|
||||
|
@ -2484,8 +2488,19 @@ func (s *Service) ApiGetMomentListByIdsFromCreater(ctx *gin.Context, req *moment
|
|||
}
|
||||
streamerExt := streamerExtMap[req.GetBaseRequest().Mid]
|
||||
|
||||
// 3.获取审核信息
|
||||
tasks, err := _DefaultMomentAuditTask.GetByMomentIds(ctx, momentIds)
|
||||
if err != nil {
|
||||
logger.Error("GetByMomentIds fail")
|
||||
return
|
||||
}
|
||||
taskMp := make(map[string]*dbstruct.MomentAuditTask)
|
||||
for _, task := range tasks {
|
||||
taskMp[task.GetAssociativeTableId()] = task
|
||||
}
|
||||
|
||||
volist = make([]*momentproto.ApiMomentVO, 0)
|
||||
// 3.填充所有信息
|
||||
// 4.填充所有信息
|
||||
for _, moment := range list {
|
||||
if moment.GetMid() != req.GetBaseRequest().Mid {
|
||||
volist, ec = make([]*momentproto.ApiMomentVO, 0), errcode.ErrCodeMomentNotHisOwn
|
||||
|
@ -2496,6 +2511,12 @@ func (s *Service) ApiGetMomentListByIdsFromCreater(ctx *gin.Context, req *moment
|
|||
}
|
||||
// 主播信息
|
||||
vo.CopyStreamerExt(streamerExt)
|
||||
|
||||
// 填充审核信息
|
||||
vo.ImageAuditOpinion = taskMp[fmt.Sprint(vo.Moment.GetId())].GetImageAuditOpinion()
|
||||
vo.TextAuditOpinion = taskMp[fmt.Sprint(vo.Moment.GetId())].GetTextAuditOpinion()
|
||||
vo.ManuallyReviewOpinion = taskMp[fmt.Sprint(vo.Moment.GetId())].GetManuallyReviewOpinion()
|
||||
|
||||
volist = append(volist, vo)
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ func (s *Service) utilFillMomentsWithApiVOInfo(ctx *gin.Context, list []*dbstruc
|
|||
return
|
||||
}
|
||||
|
||||
// 4.获取审核信息1
|
||||
// 4.获取审核信息
|
||||
tasks, err := _DefaultMomentAuditTask.GetByMomentIds(ctx, momentIds)
|
||||
if err != nil {
|
||||
logger.Error("GetByMomentIds fail")
|
||||
|
|
Loading…
Reference in New Issue