From 79fde24ceee91ca97117fb7fa932910a3398069f Mon Sep 17 00:00:00 2001 From: Leufolium Date: Tue, 29 Oct 2024 17:22:45 +0800 Subject: [PATCH] 1 --- app/mix/controller/notification_api.go | 8 ++++++++ app/mix/controller/notification_op.go | 8 ++++++++ 2 files changed, 16 insertions(+) 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),