dev add delete method
Test Workflow / test (push) Successful in 11s

This commit is contained in:
vladp
2026-04-07 10:08:53 +07:00
parent 077902f4ab
commit d8f6a08a2f
6 changed files with 53 additions and 54 deletions
@@ -116,4 +116,20 @@ public class NotificationService {
return notificationRepository.updateStatus(notificationIds, user, NotificationStatus.NEW,
NotificationStatus.READIED, LocalDateTime.now());
}
@Transactional
public int delete(List<Long> notificationIds) {
if (notificationIds == null || notificationIds.isEmpty()) {
return 0;
}
int count = 0;
for (Long notificationId : notificationIds) {
notificationRepository.deleteById(notificationId);
count += 1;
}
return count;
}
}