Merge pull request 'feat-IRONFANS-70' (#234) from feat-IRONFANS-70 into test

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/234
This commit is contained in:
chenhao 2024-04-05 19:24:27 +08:00
commit 81b4fc4e85
2 changed files with 45 additions and 12 deletions

View File

@ -7,6 +7,7 @@ import (
"service/app/mix/service"
"service/bizcommon/util"
"service/library/logger"
"service/library/mediafiller"
"github.com/gin-gonic/gin"
)
@ -86,6 +87,16 @@ func ApiGetZoneListByVisitorMid(ctx *gin.Context) {
ReplyErrCodeMsg(ctx, ec)
return
}
objectMediaNum := 5 // 单个空间服务总共5个媒体类
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
for i, vo := range list {
mediaFillableList[objectMediaNum*i+0] = vo.Previews
mediaFillableList[objectMediaNum*i+1] = vo.StreamerExt.Cover
mediaFillableList[objectMediaNum*i+2] = vo.StreamerExt.Shorts
mediaFillableList[objectMediaNum*i+3] = vo.StreamerExt.Album
mediaFillableList[objectMediaNum*i+4] = vo.StreamerExt.Avatar
}
mediafiller.FillList(ctx, mediaFillableList)
data := &zoneproto.ApiListByVisitorMidData{
List: list,
@ -111,6 +122,16 @@ func ApiGetZoneListByMid(ctx *gin.Context) {
ReplyErrCodeMsg(ctx, ec)
return
}
objectMediaNum := 5 // 单个空间服务总共5个媒体类
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
for i, vo := range list {
mediaFillableList[objectMediaNum*i+0] = vo.Previews
mediaFillableList[objectMediaNum*i+1] = vo.StreamerExt.Cover
mediaFillableList[objectMediaNum*i+2] = vo.StreamerExt.Shorts
mediaFillableList[objectMediaNum*i+3] = vo.StreamerExt.Album
mediaFillableList[objectMediaNum*i+4] = vo.StreamerExt.Avatar
}
mediafiller.FillList(ctx, mediaFillableList)
data := &zoneproto.ApiListByMidData{
List: list,

View File

@ -68,10 +68,14 @@ func ApiGetZoneMomentListByVisitorMid(ctx *gin.Context) {
return
}
//填充媒体切片
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
for i, media := range list {
mediaFillableList[i] = media.MediaComp
objectMediaNum := 5 // 单个空间贴服务总共5个媒体类
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
for i, vo := range list {
mediaFillableList[objectMediaNum*i+0] = vo.ZoneMoment.MediaComp
mediaFillableList[objectMediaNum*i+1] = vo.StreamerExt.Cover
mediaFillableList[objectMediaNum*i+2] = vo.StreamerExt.Shorts
mediaFillableList[objectMediaNum*i+3] = vo.StreamerExt.Album
mediaFillableList[objectMediaNum*i+4] = vo.StreamerExt.Avatar
}
mediafiller.FillList(ctx, mediaFillableList)
@ -100,10 +104,14 @@ func ApiGetZoneMomentListByCreaterMid(ctx *gin.Context) {
return
}
//填充媒体切片
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
for i, media := range list {
mediaFillableList[i] = media.MediaComp
objectMediaNum := 5 // 单个空间贴服务总共5个媒体类
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
for i, vo := range list {
mediaFillableList[objectMediaNum*i+0] = vo.ZoneMoment.MediaComp
mediaFillableList[objectMediaNum*i+1] = vo.StreamerExt.Cover
mediaFillableList[objectMediaNum*i+2] = vo.StreamerExt.Shorts
mediaFillableList[objectMediaNum*i+3] = vo.StreamerExt.Album
mediaFillableList[objectMediaNum*i+4] = vo.StreamerExt.Avatar
}
mediafiller.FillList(ctx, mediaFillableList)
@ -132,10 +140,14 @@ func ApiGetZoneMomentListByZid(ctx *gin.Context) {
return
}
//填充媒体切片
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
for i, media := range list {
mediaFillableList[i] = media.MediaComp
objectMediaNum := 5 // 单个空间贴服务总共5个媒体类
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
for i, vo := range list {
mediaFillableList[objectMediaNum*i+0] = vo.ZoneMoment.MediaComp
mediaFillableList[objectMediaNum*i+1] = vo.StreamerExt.Cover
mediaFillableList[objectMediaNum*i+2] = vo.StreamerExt.Shorts
mediaFillableList[objectMediaNum*i+3] = vo.StreamerExt.Album
mediaFillableList[objectMediaNum*i+4] = vo.StreamerExt.Avatar
}
mediafiller.FillList(ctx, mediaFillableList)