Created
November 14, 2017 18:05
-
-
Save mr5z/f2bb48d207b163e65bf6fb65df550027 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Query("SELECT id, title, description, dateCreated, certificateLink, deliveryStatus, userId\n" + | |
"FROM Certificates\n" + | |
"WHERE userId = :userId\n" + | |
"ORDER BY expirationDate") | |
List<CertificateDto> getAllNotifications(long userId); | |
@Query("SELECT id, title, description, dateCreated, certificateLink, deliveryStatus, userId\n" + | |
"FROM Certificates\n" + | |
"WHERE userId = :userId AND\n" + | |
" expirationDate <= date('now', '+8 hour') AND -- TODO: get client timezone from header\n" + | |
" deliveryStatus = 0\n" + | |
"ORDER BY expirationDate") | |
List<CertificateDto> getPendingNotifications(long userId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment