| Line 1841... |
Line 1841... |
| 1841 |
sendNotificationModel.setMessageType(MessageType.notification);
|
1841 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 1842 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
1842 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
| 1843 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
1843 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| 1844 |
notificationService.sendNotification(sendNotificationModel);
|
1844 |
notificationService.sendNotification(sendNotificationModel);
|
| 1845 |
|
1845 |
|
| 1846 |
//notificationService.sendWhatsappMessage(messageTemplate, title, address.getPhoneNumber());
|
1846 |
// notificationService.sendWhatsappMessage(messageTemplate, title,
|
| - |
|
1847 |
// address.getPhoneNumber());
|
| 1847 |
|
1848 |
|
| 1848 |
}
|
1849 |
}
|
| 1849 |
// String saleReport = this.getDailySalesReportHtml(partnerSalesHeadersMap,
|
1850 |
// String saleReport = this.getDailySalesReportHtml(partnerSalesHeadersMap,
|
| 1850 |
// saleTargetReportModelMap);
|
1851 |
// saleTargetReportModelMap);
|
| 1851 |
String statewiseSaleReport = this.getStateWiseSales(saleTargetReportModelMap, partnerSalesHeadersMap);
|
1852 |
String statewiseSaleReport = this.getStateWiseSales(saleTargetReportModelMap, partnerSalesHeadersMap);
|
| Line 2654... |
Line 2655... |
| 2654 |
sendNotificationModel.setMessageType(MessageType.reminder);
|
2655 |
sendNotificationModel.setMessageType(MessageType.reminder);
|
| 2655 |
sendNotificationModel.setUserIds(Arrays.asList(authUserKeyMap.get(lead.getAssignTo())));
|
2656 |
sendNotificationModel.setUserIds(Arrays.asList(authUserKeyMap.get(lead.getAssignTo())));
|
| 2656 |
System.out.println(sendNotificationModel);
|
2657 |
System.out.println(sendNotificationModel);
|
| 2657 |
notificationService.sendNotification(sendNotificationModel);
|
2658 |
notificationService.sendNotification(sendNotificationModel);
|
| 2658 |
AuthUser authUser = authRepository.selectById(lead.getAssignTo());
|
2659 |
AuthUser authUser = authRepository.selectById(lead.getAssignTo());
|
| 2659 |
// notificationService.sendWhatsappMessage(notificationMessage, title, authUser.getMobileNumber());
|
2660 |
// notificationService.sendWhatsappMessage(notificationMessage, title,
|
| - |
|
2661 |
// authUser.getMobileNumber());
|
| 2660 |
}
|
2662 |
}
|
| 2661 |
}
|
2663 |
}
|
| 2662 |
|
2664 |
|
| 2663 |
public void notifyVisits() throws Exception {
|
2665 |
public void notifyVisits() throws Exception {
|
| 2664 |
List<FranchiseeVisit> franchiseeVisits = franchiseeVisitRepository
|
2666 |
List<FranchiseeVisit> franchiseeVisits = franchiseeVisitRepository
|
| Line 3256... |
Line 3258... |
| 3256 |
sendNotificationModel.setMessageType(MessageType.notification);
|
3258 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 3257 |
int userId = userAccountRepository.selectUserIdByRetailerId(orders.get(0).getRetailerId());
|
3259 |
int userId = userAccountRepository.selectUserIdByRetailerId(orders.get(0).getRetailerId());
|
| 3258 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
3260 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| 3259 |
notificationService.sendNotification(sendNotificationModel);
|
3261 |
notificationService.sendNotification(sendNotificationModel);
|
| 3260 |
|
3262 |
|
| 3261 |
//notificationService.sendWhatsappMessage(message, title, address.getPhoneNumber());
|
3263 |
// notificationService.sendWhatsappMessage(message, title,
|
| - |
|
3264 |
// address.getPhoneNumber());
|
| 3262 |
|
3265 |
|
| 3263 |
}
|
3266 |
}
|
| 3264 |
}
|
3267 |
}
|
| 3265 |
|
3268 |
|
| 3266 |
}
|
3269 |
}
|
| Line 3613... |
Line 3616... |
| 3613 |
String url = "http://app.smartdukaan.com/pages/home/credit";
|
3616 |
String url = "http://app.smartdukaan.com/pages/home/credit";
|
| 3614 |
String message = "Your total pending Loan amount is Rs. "
|
3617 |
String message = "Your total pending Loan amount is Rs. "
|
| 3615 |
+ FormattingUtils.formatDecimal(Math.abs(partnerLoanAmountEnrty.getValue()));
|
3618 |
+ FormattingUtils.formatDecimal(Math.abs(partnerLoanAmountEnrty.getValue()));
|
| 3616 |
notificationService.sendNotification(fofoId, title, MessageType.notification, title, message, url);
|
3619 |
notificationService.sendNotification(fofoId, title, MessageType.notification, title, message, url);
|
| 3617 |
|
3620 |
|
| 3618 |
//notificationService.sendWhatsappMessage(message, title, address.getPhoneNumber());
|
3621 |
// notificationService.sendWhatsappMessage(message, title,
|
| - |
|
3622 |
// address.getPhoneNumber());
|
| 3619 |
|
3623 |
|
| 3620 |
}
|
3624 |
}
|
| 3621 |
|
3625 |
|
| 3622 |
}
|
3626 |
}
|
| 3623 |
|
3627 |
|
| Line 3770... |
Line 3774... |
| 3770 |
+ "% + and Rs.100 shall be levied on daily basis. " + "Your total pending Loan amount is Rs."
|
3774 |
+ "% + and Rs.100 shall be levied on daily basis. " + "Your total pending Loan amount is Rs."
|
| 3771 |
+ FormattingUtils.formatDecimal(Math.abs(amount)) + ". !!Pay Now!!";
|
3775 |
+ FormattingUtils.formatDecimal(Math.abs(amount)) + ". !!Pay Now!!";
|
| 3772 |
notificationService.sendNotification(defaultLoan.getFofoId(), title, MessageType.notification, title,
|
3776 |
notificationService.sendNotification(defaultLoan.getFofoId(), title, MessageType.notification, title,
|
| 3773 |
message, url);
|
3777 |
message, url);
|
| 3774 |
|
3778 |
|
| 3775 |
//notificationService.sendWhatsappMessage(message, title, address.getPhoneNumber());
|
3779 |
// notificationService.sendWhatsappMessage(message, title,
|
| - |
|
3780 |
// address.getPhoneNumber());
|
| 3776 |
|
3781 |
|
| 3777 |
}
|
3782 |
}
|
| 3778 |
}
|
3783 |
}
|
| 3779 |
|
3784 |
|
| 3780 |
private String getMessageForDueDateExtend(List<Loan> loans) throws ProfitMandiBusinessException {
|
3785 |
private String getMessageForDueDateExtend(List<Loan> loans) throws ProfitMandiBusinessException {
|
| Line 3848... |
Line 3853... |
| 3848 |
+ "% shall be levied on daily basis. Your total pending Loan amount is Rs."
|
3853 |
+ "% shall be levied on daily basis. Your total pending Loan amount is Rs."
|
| 3849 |
+ FormattingUtils.formatDecimal(Math.abs(amount)) + ". !!Pay Now!!";
|
3854 |
+ FormattingUtils.formatDecimal(Math.abs(amount)) + ". !!Pay Now!!";
|
| 3850 |
notificationService.sendNotification(loan.getFofoId(), title, MessageType.notification, title,
|
3855 |
notificationService.sendNotification(loan.getFofoId(), title, MessageType.notification, title,
|
| 3851 |
message, url);
|
3856 |
message, url);
|
| 3852 |
|
3857 |
|
| 3853 |
//notificationService.sendWhatsappMessage(message, title, address.getPhoneNumber());
|
3858 |
// notificationService.sendWhatsappMessage(message, title,
|
| - |
|
3859 |
// address.getPhoneNumber());
|
| 3854 |
|
3860 |
|
| 3855 |
}
|
3861 |
}
|
| 3856 |
}
|
3862 |
}
|
| 3857 |
}
|
3863 |
}
|
| 3858 |
|
3864 |
|
| Line 3894... |
Line 3900... |
| 3894 |
+ ", Pay Now!!";
|
3900 |
+ ", Pay Now!!";
|
| 3895 |
|
3901 |
|
| 3896 |
}
|
3902 |
}
|
| 3897 |
notificationService.sendNotification(loan.getFofoId(), title, MessageType.notification, title,
|
3903 |
notificationService.sendNotification(loan.getFofoId(), title, MessageType.notification, title,
|
| 3898 |
message, url);
|
3904 |
message, url);
|
| 3899 |
//notificationService.sendWhatsappMessage(message, title, address.getPhoneNumber());
|
3905 |
// notificationService.sendWhatsappMessage(message, title,
|
| - |
|
3906 |
// address.getPhoneNumber());
|
| 3900 |
|
3907 |
|
| 3901 |
}
|
3908 |
}
|
| 3902 |
}
|
3909 |
}
|
| 3903 |
}
|
3910 |
}
|
| 3904 |
|
3911 |
|
| Line 3912... |
Line 3919... |
| 3912 |
.selectByIds(fofoStores.stream().map(x -> x.getId()).collect(Collectors.toList()));
|
3919 |
.selectByIds(fofoStores.stream().map(x -> x.getId()).collect(Collectors.toList()));
|
| 3913 |
|
3920 |
|
| 3914 |
List<Address> addresses = addressRepository
|
3921 |
List<Address> addresses = addressRepository
|
| 3915 |
.selectByIds(users.stream().map(x -> x.getAddressId()).collect(Collectors.toList()));
|
3922 |
.selectByIds(users.stream().map(x -> x.getAddressId()).collect(Collectors.toList()));
|
| 3916 |
|
3923 |
|
| - |
|
3924 |
LOGGER.info("addresses" + addresses);
|
| - |
|
3925 |
|
| 3917 |
for (Address address : addresses) {
|
3926 |
for (Address address : addresses) {
|
| 3918 |
Map<String, String> requestheaders = new HashMap<>();
|
3927 |
Map<String, String> requestheaders = new HashMap<>();
|
| 3919 |
requestheaders.put("Content-Type", "application/x-www-form-urlencoded");
|
3928 |
requestheaders.put("Content-Type", "application/x-www-form-urlencoded");
|
| 3920 |
Map<String, String> requestParams = new HashMap<>();
|
3929 |
Map<String, String> requestParams = new HashMap<>();
|
| 3921 |
requestParams.put("userid", String.valueOf(2000215976));
|
3930 |
requestParams.put("userid", String.valueOf(2000215976));
|
| Line 3936... |
Line 3945... |
| 3936 |
}
|
3945 |
}
|
| 3937 |
|
3946 |
|
| 3938 |
public void authUserMobileNumberOptIn() throws HttpHostConnectException, ProfitMandiBusinessException {
|
3947 |
public void authUserMobileNumberOptIn() throws HttpHostConnectException, ProfitMandiBusinessException {
|
| 3939 |
|
3948 |
|
| 3940 |
List<AuthUser> authUsers = authRepository.selectAllActiveUser();
|
3949 |
List<AuthUser> authUsers = authRepository.selectAllActiveUser();
|
| - |
|
3950 |
LOGGER.info("authUsers" + authUsers);
|
| - |
|
3951 |
|
| 3941 |
for (AuthUser authUser : authUsers) {
|
3952 |
for (AuthUser authUser : authUsers) {
|
| 3942 |
Map<String, String> requestheaders = new HashMap<>();
|
3953 |
Map<String, String> requestheaders = new HashMap<>();
|
| 3943 |
requestheaders.put("Content-Type", "application/x-www-form-urlencoded");
|
3954 |
requestheaders.put("Content-Type", "application/x-www-form-urlencoded");
|
| 3944 |
Map<String, String> requestParams = new HashMap<>();
|
3955 |
Map<String, String> requestParams = new HashMap<>();
|
| 3945 |
requestParams.put("userid", String.valueOf(2000215976));
|
3956 |
requestParams.put("userid", String.valueOf(2000215976));
|