Updated Apis, Code, Configurations for Notification.

This commit is contained in:
piyushkag
2024-12-24 16:07:42 +05:30
parent db48cf9502
commit 96b57519fb
23 changed files with 278 additions and 201 deletions

View File

@@ -51,6 +51,7 @@ import net.gepafin.tendermanagement.web.rest.api.errors.Status;
import static net.gepafin.tendermanagement.enums.RoleStatusEnum.ROLE_SUPER_ADMIN;
import static net.gepafin.tendermanagement.util.Utils.setIfUpdated;
import static org.hibernate.internal.util.collections.CollectionHelper.listOf;
@Component
public class CallDao {
@@ -845,7 +846,8 @@ public class CallDao {
Map<String, String> placeholders = new HashMap<>();
placeholders.put("{{call_name}}", callEntity.getName());
userIds.forEach(userId -> {
NotificationReq notificationReq = notificationDao.createNotificationReq(NotificationTypeEnum.CALL_CREATED.getValue(), placeholders, userId);
List<Long> companyIds = notificationDao.getAllCompanyIdsForUser(userId);
NotificationReq notificationReq = notificationDao.createNotificationReq(NotificationTypeEnum.CALL_CREATED.getValue(), placeholders, userId, null, companyIds);
notificationDao.sendNotification(notificationReq);
});