| Line 125... |
Line 125... |
| 125 |
sendNotificationModel.getUserIds().addAll(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
|
125 |
sendNotificationModel.getUserIds().addAll(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
|
| 126 |
this.sendNotification(sendNotificationModel);
|
126 |
this.sendNotification(sendNotificationModel);
|
| 127 |
}
|
127 |
}
|
| 128 |
|
128 |
|
| 129 |
@Override
|
129 |
@Override
|
| 130 |
public void sendNotification(int fofoId, String campaignName, String title, String message) throws ProfitMandiBusinessException {
|
130 |
public void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message) throws ProfitMandiBusinessException {
|
| 131 |
SendNotificationModel sendNotificationModel = this.getDefaultNotificationModel();
|
131 |
SendNotificationModel sendNotificationModel = this.getDefaultNotificationModel();
|
| 132 |
sendNotificationModel.setCampaignName(campaignName);
|
132 |
sendNotificationModel.setCampaignName(campaignName);
|
| - |
|
133 |
sendNotificationModel.setMessageType(messageType);
|
| 133 |
sendNotificationModel.setTitle(title);
|
134 |
sendNotificationModel.setTitle(title);
|
| 134 |
sendNotificationModel.setMessage(message);
|
135 |
sendNotificationModel.setMessage(message);
|
| 135 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
136 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
| 136 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
137 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| 137 |
sendNotificationModel.setMessageType(MessageType.wallet);
|
138 |
sendNotificationModel.setMessageType(MessageType.wallet);
|
| - |
|
139 |
this.sendNotification(sendNotificationModel);
|
| 138 |
}
|
140 |
}
|
| 139 |
|
141 |
|
| 140 |
public SendNotificationModel getDefaultNotificationModel() {
|
142 |
public SendNotificationModel getDefaultNotificationModel() {
|
| 141 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
143 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 142 |
sendNotificationModel.setType("url");
|
144 |
sendNotificationModel.setType("url");
|