fix archived
This commit is contained in:
@@ -49,6 +49,7 @@ type LetterOutgoingProcessor interface {
|
||||
GetOutgoingLetterWithDetails(ctx context.Context, letterID uuid.UUID) (*entities.LetterOutgoing, error)
|
||||
GetUsersByIDs(ctx context.Context, userIDs []uuid.UUID) ([]entities.User, error)
|
||||
BulkArchiveOutgoingLetters(ctx context.Context, letterIDs []uuid.UUID) (int64, error)
|
||||
BulkArchiveIncomingLettersForUser(ctx context.Context, letterIDs []uuid.UUID, userId uuid.UUID) (int64, error)
|
||||
|
||||
// Batch loading methods for efficient querying
|
||||
GetBatchAttachments(ctx context.Context, letterIDs []uuid.UUID) (map[uuid.UUID][]entities.LetterOutgoingAttachment, error)
|
||||
@@ -1087,6 +1088,10 @@ func (p *LetterOutgoingProcessorImpl) BulkArchiveOutgoingLetters(ctx context.Con
|
||||
return p.letterRepo.BulkArchive(ctx, letterIDs)
|
||||
}
|
||||
|
||||
func (p *LetterOutgoingProcessorImpl) BulkArchiveIncomingLettersForUser(ctx context.Context, letterIDs []uuid.UUID, userID uuid.UUID) (int64, error) {
|
||||
return p.letterRepo.BulkArchiveForUser(ctx, letterIDs, userID)
|
||||
}
|
||||
|
||||
// GetBatchAttachments fetches attachments for multiple letters in a single query
|
||||
func (p *LetterOutgoingProcessorImpl) GetBatchAttachments(ctx context.Context, letterIDs []uuid.UUID) (map[uuid.UUID][]entities.LetterOutgoingAttachment, error) {
|
||||
if p.attachmentRepo == nil || len(letterIDs) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user