| Line 423... |
Line 423... |
| 423 |
.map(x -> x.getGmailId()).collect(Collectors.toList());
|
423 |
.map(x -> x.getGmailId()).collect(Collectors.toList());
|
| 424 |
gmailIds.add("tarunverma09@gmail.com");
|
424 |
gmailIds.add("tarunverma09@gmail.com");
|
| 425 |
gmailIds.add("tejbeerkaur27@gmail.com");
|
425 |
gmailIds.add("tejbeerkaur27@gmail.com");
|
| 426 |
List<User> user = dtrUserRepository.selectAllByEmailIds(gmailIds);
|
426 |
List<User> user = dtrUserRepository.selectAllByEmailIds(gmailIds);
|
| 427 |
List<Integer> userIds = user.stream().map(x -> x.getId()).collect(Collectors.toList());
|
427 |
List<Integer> userIds = user.stream().map(x -> x.getId()).collect(Collectors.toList());
|
| - |
|
428 |
|
| - |
|
429 |
logger.info("userIds" + userIds);
|
| 428 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
430 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 429 |
sendNotificationModel.setCampaignName("Online Order Alert");
|
431 |
sendNotificationModel.setCampaignName("Online Order Alert");
|
| 430 |
sendNotificationModel.setTitle("Online Order Update");
|
432 |
sendNotificationModel.setTitle("Online Order Update");
|
| 431 |
sendNotificationModel.setMessage(String.format(
|
433 |
sendNotificationModel.setMessage(String.format(
|
| 432 |
"You have new Online Order. Please check your Dashboard. In case of an activation scheme pls ensure the handset is activated, payout will be processed as per brand's activation report."));
|
434 |
"You have new Online Order. Please check your Dashboard. In case of an activation scheme pls ensure the handset is activated, payout will be processed as per brand's activation report."));
|
| Line 436... |
Line 438... |
| 436 |
sendNotificationModel.setMessageType(MessageType.notification);
|
438 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 437 |
int userId = userAccountRepository.selectUserIdByRetailerId(pendingOrder.getFofoId());
|
439 |
int userId = userAccountRepository.selectUserIdByRetailerId(pendingOrder.getFofoId());
|
| 438 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
440 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| 439 |
notificationService.sendNotification(sendNotificationModel);
|
441 |
notificationService.sendNotification(sendNotificationModel);
|
| 440 |
|
442 |
|
| 441 |
sendNotificationModel = new SendNotificationModel();
|
443 |
SendNotificationModel snm = new SendNotificationModel();
|
| 442 |
sendNotificationModel.setCampaignName("Online Order Alert");
|
444 |
snm.setCampaignName("Online Order Alert");
|
| 443 |
sendNotificationModel.setTitle("Online Order Update");
|
445 |
snm.setTitle("Online Order Update");
|
| 444 |
sendNotificationModel.setMessage(String.format("Your Partner " + customRetailer.getBusinessName()
|
446 |
snm.setMessage(String.format("Your Partner " + customRetailer.getBusinessName()
|
| 445 |
+ " have new Online Order. Please inform your partner. In case of an activation scheme pls ensure the handset is activated, payout will be processed as per brand's activation report."));
|
447 |
+ " have new Online Order. Please inform your partner. In case of an activation scheme pls ensure the handset is activated, payout will be processed as per brand's activation report."));
|
| 446 |
sendNotificationModel.setType("url");
|
448 |
snm.setType("url");
|
| 447 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
449 |
snm.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
| 448 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
450 |
snm.setExpiresat(LocalDateTime.now().plusDays(1));
|
| 449 |
sendNotificationModel.setMessageType(MessageType.notification);
|
451 |
snm.setMessageType(MessageType.notification);
|
| 450 |
sendNotificationModel.setUserIds(userIds);
|
452 |
snm.setUserIds(userIds);
|
| 451 |
notificationService.sendNotification(sendNotificationModel);
|
453 |
notificationService.sendNotification(snm);
|
| 452 |
|
454 |
|
| 453 |
}
|
455 |
}
|
| 454 |
return responseSender.ok(returnMap);
|
456 |
return responseSender.ok(returnMap);
|
| 455 |
|
457 |
|
| 456 |
}
|
458 |
}
|