| Line 2335... |
Line 2335... |
| 2335 |
helper.setFrom(senderAddress);
|
2335 |
helper.setFrom(senderAddress);
|
| 2336 |
mailSender.send(message);
|
2336 |
mailSender.send(message);
|
| 2337 |
}
|
2337 |
}
|
| 2338 |
|
2338 |
|
| 2339 |
public void sendNotification() throws Exception {
|
2339 |
public void sendNotification() throws Exception {
|
| 2340 |
List<PushNotifications> pushNotifications = pushNotificationRepository.selectAllByTimestamp();
|
2340 |
List<PushNotifications> pushNotifications = pushNotificationRepository.selectAllPendingNotifications();
|
| 2341 |
if (!pushNotifications.isEmpty()) {
|
2341 |
if (!pushNotifications.isEmpty()) {
|
| 2342 |
for (PushNotifications pushNotification : pushNotifications) {
|
2342 |
for (PushNotifications pushNotification : pushNotifications) {
|
| 2343 |
Device device = deviceRepository.selectById(pushNotification.getDeviceId());
|
2343 |
Device device = deviceRepository.selectById(pushNotification.getDeviceId());
|
| 2344 |
NotificationCampaign notificationCampaign = notificationCampaignRepository.selectById(pushNotification.getNotificationCampaignid());
|
2344 |
NotificationCampaign notificationCampaign = notificationCampaignRepository.selectById(pushNotification.getNotificationCampaignid());
|
| 2345 |
SimpleCampaignParams scp = gson.fromJson(notificationCampaign.getImplementationParams(), SimpleCampaignParams.class);
|
2345 |
SimpleCampaignParams scp = gson.fromJson(notificationCampaign.getImplementationParams(), SimpleCampaignParams.class);
|