|
|
|
@ -18,6 +18,7 @@ package org.thingsboard.server.dao.sql.notification; |
|
|
|
import org.springframework.data.domain.Page; |
|
|
|
import org.springframework.data.domain.Pageable; |
|
|
|
import org.springframework.data.jpa.repository.JpaRepository; |
|
|
|
import org.springframework.data.jpa.repository.Modifying; |
|
|
|
import org.springframework.data.jpa.repository.Query; |
|
|
|
import org.springframework.data.repository.query.Param; |
|
|
|
import org.springframework.stereotype.Repository; |
|
|
|
@ -49,7 +50,9 @@ public interface NotificationTargetRepository extends JpaRepository<Notification |
|
|
|
List<NotificationTargetEntity> findByTenantIdAndIdIn(UUID tenantId, List<UUID> ids); |
|
|
|
|
|
|
|
@Transactional |
|
|
|
void deleteByTenantId(UUID tenantId); |
|
|
|
@Modifying |
|
|
|
@Query("DELETE FROM NotificationTargetEntity t WHERE t.tenantId = :tenantId") |
|
|
|
void deleteByTenantId(@Param("tenantId") UUID tenantId); |
|
|
|
|
|
|
|
long countByTenantId(UUID tenantId); |
|
|
|
|
|
|
|
|