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:
commit
81b4fc4e85
|
@ -7,6 +7,7 @@ import (
|
||||||
"service/app/mix/service"
|
"service/app/mix/service"
|
||||||
"service/bizcommon/util"
|
"service/bizcommon/util"
|
||||||
"service/library/logger"
|
"service/library/logger"
|
||||||
|
"service/library/mediafiller"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -86,6 +87,16 @@ func ApiGetZoneListByVisitorMid(ctx *gin.Context) {
|
||||||
ReplyErrCodeMsg(ctx, ec)
|
ReplyErrCodeMsg(ctx, ec)
|
||||||
return
|
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{
|
data := &zoneproto.ApiListByVisitorMidData{
|
||||||
List: list,
|
List: list,
|
||||||
|
@ -111,6 +122,16 @@ func ApiGetZoneListByMid(ctx *gin.Context) {
|
||||||
ReplyErrCodeMsg(ctx, ec)
|
ReplyErrCodeMsg(ctx, ec)
|
||||||
return
|
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{
|
data := &zoneproto.ApiListByMidData{
|
||||||
List: list,
|
List: list,
|
||||||
|
|
|
@ -68,10 +68,14 @@ func ApiGetZoneMomentListByVisitorMid(ctx *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//填充媒体切片
|
objectMediaNum := 5 // 单个空间贴服务总共5个媒体类
|
||||||
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
|
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
|
||||||
for i, media := range list {
|
for i, vo := range list {
|
||||||
mediaFillableList[i] = media.MediaComp
|
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)
|
mediafiller.FillList(ctx, mediaFillableList)
|
||||||
|
|
||||||
|
@ -100,10 +104,14 @@ func ApiGetZoneMomentListByCreaterMid(ctx *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//填充媒体切片
|
objectMediaNum := 5 // 单个空间贴服务总共5个媒体类
|
||||||
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
|
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
|
||||||
for i, media := range list {
|
for i, vo := range list {
|
||||||
mediaFillableList[i] = media.MediaComp
|
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)
|
mediafiller.FillList(ctx, mediaFillableList)
|
||||||
|
|
||||||
|
@ -132,10 +140,14 @@ func ApiGetZoneMomentListByZid(ctx *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//填充媒体切片
|
objectMediaNum := 5 // 单个空间贴服务总共5个媒体类
|
||||||
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
|
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
|
||||||
for i, media := range list {
|
for i, vo := range list {
|
||||||
mediaFillableList[i] = media.MediaComp
|
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)
|
mediafiller.FillList(ctx, mediaFillableList)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue