|
|
|
@ -81,6 +81,9 @@ public class JpaNotificationDao extends JpaAbstractDao<NotificationEntity, Notif |
|
|
|
return notificationRepository.updateStatusByIdAndRecipientId(notificationId.getId(), recipientId.getId(), status) != 0; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* For this hot method, the partial index `idx_notification_recipient_id_unread` was introduced since 3.5.2 |
|
|
|
* */ |
|
|
|
@Override |
|
|
|
public int countUnreadByRecipientId(TenantId tenantId, UserId recipientId) { |
|
|
|
return notificationRepository.countByRecipientIdAndStatusNot(recipientId.getId(), NotificationStatus.READ); |
|
|
|
|