galovics commented on code in PR #2330:
URL: https://github.com/apache/fineract/pull/2330#discussion_r877003153
##########
fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformServiceImpl.java:
##########
@@ -64,7 +53,7 @@ public Long notify(Long userId, String objectType, Long
objectIdentifier, String
private Long insertIntoNotificationMapper(Long userId, Long
generatedNotificationId) {
AppUser appUser = this.appUserRepository.findById(userId).orElse(null);
NotificationMapper notificationMapper = new NotificationMapper(
-
this.notificationGeneratorReadRepositoryWrapper.findById(generatedNotificationId),
appUser, false, getCurrentDateTime());
+
this.notificationGeneratorReadRepositoryWrapper.findById(generatedNotificationId),
appUser, false, new Date());
Review Comment:
Good point. I replicated the original implementation with the new Date but
I'm gonna switch it to the tenant date. Thanks.
##########
fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformServiceImpl.java:
##########
@@ -74,13 +63,13 @@ private Long insertIntoNotificationGenerator(String
objectType, Long objectIdent
String notificationContent, boolean isSystemGenerated) {
Notification notification = new Notification(objectType,
objectIdentifier, action, actorId, isSystemGenerated, notificationContent,
- getCurrentDateTime());
+ new Date());
Review Comment:
Same as above.
##########
fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformServiceImpl.java:
##########
@@ -90,22 +79,15 @@ public Long notify(List<Long> userIds, String objectType,
Long objectId, String
return generatedNotificationId;
}
- private List<Long> insertIntoNotificationMapper(List<Long> userIds, Long
generatedNotificationId) {
+ private List<Long> insertIntoNotificationMapper(Collection<Long> userIds,
Long generatedNotificationId) {
List<Long> mappedIds = new ArrayList<>();
for (Long userId : userIds) {
AppUser appUser = this.appUserRepository.findById(userId).get();
NotificationMapper notificationMapper = new NotificationMapper(
-
this.notificationGeneratorReadRepositoryWrapper.findById(generatedNotificationId),
appUser, false,
- getCurrentDateTime());
+
this.notificationGeneratorReadRepositoryWrapper.findById(generatedNotificationId),
appUser, false, new Date());
Review Comment:
Same as above.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]