Updated code

This commit is contained in:
harish
2024-11-06 14:09:57 +05:30
parent 89e498ccb7
commit 3c1c6c9487
3 changed files with 27 additions and 5 deletions

View File

@@ -735,9 +735,20 @@ public class ApplicationDao {
email = userEntity.getBeneficiary().getEmail();
}
emailNotificationDao.sendMail(hub.getId(), subject, body, List.of(email));
emailNotificationDao.sendMail(hub.getId(), subject, body, List.of(applicationEntity.getCompany().getEmail()));
}
List<String> recipientEmails = new ArrayList<>();
recipientEmails.add(email);
String companyEmail = company.getEmail();
String contactEmail = company.getContactEmail();
if (companyEmail != null && !companyEmail.isEmpty()) {
recipientEmails.add(companyEmail);
}
if (contactEmail != null && !contactEmail.isEmpty() && !contactEmail.equals(companyEmail)) {
recipientEmails.add(contactEmail);
}
emailNotificationDao.sendMail(hub.getId(), subject, body, recipientEmails);
}
private void sendMailTodefaultSystemAndGepafin(UserEntity userEntity, ApplicationEntity applicationEntity) {
CallEntity call = applicationEntity.getCall();
CompanyEntity company = applicationEntity.getCompany();