You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/11/07 11:13:12 UTC

[GitHub] [fineract] wkigenyi commented on a diff in pull request #2730: FINERACT-1673: Add an endpoint for marking a single notification as read

wkigenyi commented on code in PR #2730:
URL: https://github.com/apache/fineract/pull/2730#discussion_r1015296482


##########
fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformServiceImpl.java:
##########
@@ -94,9 +95,8 @@ private boolean createUpdateCacheValue(Long appUserId, Long now,
     }
 
     private boolean checkForUnreadNotifications(Long appUserId) {
-        String sql = "SELECT id, notification_id as notificationId, user_id as userId, is_read as isRead, created_at "
-                + "as createdAt FROM notification_mapper WHERE user_id = ? AND is_read = false";
-        List<NotificationMapperData> notificationMappers = this.jdbcTemplate.query(sql, notificationMapperRow, appUserId);
+
+        Collection<NotificationMapper> notificationMappers = this.notificationMapperRepository.getUnreadNotificationsForAUser(appUserId);

Review Comment:
   Thanks @vidakovic  I am fixing this. I am having a problem though, when I updated my local code with the last, on running gradle bootRun, I get this error: "Caused by: java.sql.SQLSyntaxErrorException: (conn=988) Table 'batch_job_instance' already exists". How do I get past it ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org