|
|
|
@ -15,7 +15,6 @@ |
|
|
|
*/ |
|
|
|
package org.thingsboard.server.dao.sql.notification; |
|
|
|
|
|
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
|
import org.springframework.data.domain.Page; |
|
|
|
import org.springframework.data.domain.Pageable; |
|
|
|
import org.springframework.data.jpa.repository.JpaRepository; |
|
|
|
@ -49,15 +48,6 @@ public interface NotificationRepository extends JpaRepository<NotificationEntity |
|
|
|
|
|
|
|
Page<NotificationEntity> findByRequestId(UUID requestId, Pageable pageable); |
|
|
|
|
|
|
|
@Modifying |
|
|
|
@Transactional |
|
|
|
@Query("UPDATE NotificationEntity n " + |
|
|
|
"SET n.info = :info, n.reason = :reason " + |
|
|
|
"WHERE n.requestId = :requestId") |
|
|
|
int updateReasonAndInfoByRequestId(@Param("requestId") UUID requestId, |
|
|
|
@Param("reason") String reason, |
|
|
|
@Param("info") JsonNode info); |
|
|
|
|
|
|
|
int countByRequestId(UUID requestId); |
|
|
|
|
|
|
|
int countByRequestIdAndStatus(UUID requestId, NotificationStatus status); |
|
|
|
|