| Line 85... |
Line 85... |
| 85 |
Utils.sendMailWithAttachments(mailSender, emailTo, ccTo, subject, message);
|
85 |
Utils.sendMailWithAttachments(mailSender, emailTo, ccTo, subject, message);
|
| 86 |
}
|
86 |
}
|
| 87 |
|
87 |
|
| 88 |
@Override
|
88 |
@Override
|
| 89 |
public void sendSummaryMailToUserAndManagers(int userId, List<Bid> bids, Liquidation liquidation) throws Exception {
|
89 |
public void sendSummaryMailToUserAndManagers(int userId, List<Bid> bids, Liquidation liquidation) throws Exception {
|
| - |
|
90 |
if (bids.size() > 0) {
|
| 90 |
String content = this.generateContent(bids, liquidation, ProfitMandiConstants.BID_ENUM.CLOSED);
|
91 |
String content = this.generateContent(bids, liquidation, ProfitMandiConstants.BID_ENUM.CLOSED);
|
| 91 |
AuthUser authUser = authRepository.selectById(userId);
|
92 |
AuthUser authUser = authRepository.selectById(userId);
|
| 92 |
String[] emailTo = {authUser.getEmailId(), "sourcing@smartdukaan.com", "vikas.jangra@smartdukaan.com"};
|
93 |
String[] emailTo = {authUser.getEmailId(), "sourcing@smartdukaan.com", "vikas.jangra@smartdukaan.com"};
|
| 93 |
|
94 |
|
| 94 |
String[] ccTo = authService.getAllManagers(userId).stream().map(AuthUser::getEmailId).toArray(String[]::new);
|
95 |
String[] ccTo = authService.getAllManagers(userId).stream().map(AuthUser::getEmailId).toArray(String[]::new);
|
| 95 |
String subject = "Liquidation Report";
|
96 |
String subject = "Liquidation Report";
|
| 96 |
String message = "Dear Team,\n\n"
|
97 |
String message = "Dear Team,\n\n"
|
| 97 |
+ "Liquidation has been completed. Here is the summary:\n\n"
|
98 |
+ "Liquidation has been completed. Here is the summary:\n\n"
|
| 98 |
+ content;
|
99 |
+ content;
|
| 99 |
|
100 |
|
| 100 |
LOGGER.info("mailMessage: {}",message);
|
- |
|
| 101 |
Utils.sendMailWithAttachments(mailSender, emailTo, ccTo, subject, message);
|
101 |
Utils.sendMailWithAttachments(mailSender, emailTo, ccTo, subject, message);
|
| - |
|
102 |
}
|
| 102 |
}
|
103 |
}
|
| 103 |
|
104 |
|
| 104 |
@Override
|
105 |
@Override
|
| 105 |
public void notifyPartner(int fofoId, Bid bid, ProfitMandiConstants.BID_ENUM status) throws Exception {
|
106 |
public void notifyPartner(int fofoId, Bid bid, ProfitMandiConstants.BID_ENUM status) throws Exception {
|
| 106 |
User user = userRepository.selectById(fofoId);
|
107 |
User user = userRepository.selectById(fofoId);
|