update
This commit is contained in:
@ -40,6 +40,8 @@ type ArticleService interface {
|
||||
SetCover(ctx context.Context, runwayID uint32, image string) error
|
||||
// SetDeleted 上下架:deleted=1 下架(对外不可见),0 上架。
|
||||
SetDeleted(ctx context.Context, id uint32, deleted uint8) error
|
||||
// SumImageSize 返回某条走秀全部存活图片的原图字节数之和(供后台「图集原图总大小」展示)。
|
||||
SumImageSize(ctx context.Context, runwayID uint32) (int64, error)
|
||||
// PurgeGallery 彻底下架图集:级联软删图片 + 下架 + 异步入队清理S4孤儿图。
|
||||
PurgeGallery(ctx context.Context, id uint32) error
|
||||
}
|
||||
@ -305,6 +307,11 @@ func (s *articleService) SetCover(ctx context.Context, runwayID uint32, image st
|
||||
return s.articles.SetRunwayCover(ctx, runwayID, image)
|
||||
}
|
||||
|
||||
// SumImageSize 返回某条走秀全部存活图片的原图字节数之和(供后台「图集原图总大小」展示)。
|
||||
func (s *articleService) SumImageSize(ctx context.Context, runwayID uint32) (int64, error) {
|
||||
return s.articles.SumImageSize(ctx, runwayID)
|
||||
}
|
||||
|
||||
func (s *articleService) SetDeleted(ctx context.Context, id uint32, deleted uint8) error {
|
||||
if deleted == 1 {
|
||||
// 下架图集:软删图片 + 置下架 + 异步入队清理S4孤儿图(见 PurgeGallery)。
|
||||
|
||||
Reference in New Issue
Block a user