diff --git a/app/mix/controller/notification_api.go b/app/mix/controller/notification_api.go index d11c5fd4..37f0e130 100644 --- a/app/mix/controller/notification_api.go +++ b/app/mix/controller/notification_api.go @@ -7,6 +7,7 @@ import ( "service/app/mix/service" "service/bizcommon/util" "service/library/logger" + "service/library/mediafiller" "github.com/gin-gonic/gin" ) @@ -26,6 +27,13 @@ func ApiGetNotificationListByMid(ctx *gin.Context) { return } + //填充媒体切片 + mediaFillableList := make([]mediafiller.MediaFillable, len(list)) + for i, media := range list { + mediaFillableList[i] = media.Thumbnail + } + mediafiller.FillList(ctx, mediaFillableList) + data := ¬ificationproto.ApiListByMidData{ List: list, Offset: req.Offset + len(list), diff --git a/app/mix/controller/notification_op.go b/app/mix/controller/notification_op.go index cead1157..d54717c0 100644 --- a/app/mix/controller/notification_op.go +++ b/app/mix/controller/notification_op.go @@ -7,6 +7,7 @@ import ( "service/app/mix/service" "service/bizcommon/util" "service/library/logger" + "service/library/mediafiller" "github.com/gin-gonic/gin" ) @@ -62,6 +63,13 @@ func OpGetNotificationList(ctx *gin.Context) { return } + //填充媒体切片 + mediaFillableList := make([]mediafiller.MediaFillable, len(list)) + for i, media := range list { + mediaFillableList[i] = media.Thumbnail + } + mediafiller.FillList(ctx, mediaFillableList) + data := ¬ificationproto.OpListData{ List: list, Offset: req.Offset + len(list),