This commit is contained in:
Leufolium 2024-10-29 17:22:45 +08:00
parent 8fdac4d4f2
commit 79fde24cee
2 changed files with 16 additions and 0 deletions

View File

@ -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"
) )
@ -26,6 +27,13 @@ func ApiGetNotificationListByMid(ctx *gin.Context) {
return return
} }
//填充媒体切片
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
for i, media := range list {
mediaFillableList[i] = media.Thumbnail
}
mediafiller.FillList(ctx, mediaFillableList)
data := &notificationproto.ApiListByMidData{ data := &notificationproto.ApiListByMidData{
List: list, List: list,
Offset: req.Offset + len(list), Offset: req.Offset + len(list),

View File

@ -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"
) )
@ -62,6 +63,13 @@ func OpGetNotificationList(ctx *gin.Context) {
return return
} }
//填充媒体切片
mediaFillableList := make([]mediafiller.MediaFillable, len(list))
for i, media := range list {
mediaFillableList[i] = media.Thumbnail
}
mediafiller.FillList(ctx, mediaFillableList)
data := &notificationproto.OpListData{ data := &notificationproto.OpListData{
List: list, List: list,
Offset: req.Offset + len(list), Offset: req.Offset + len(list),