Fixed issue for evaluation expiration

This commit is contained in:
nisha
2025-01-29 13:00:18 +05:30
parent acb16d1941
commit 651ea9540a
4 changed files with 18 additions and 4 deletions

View File

@@ -208,6 +208,20 @@ public class NotificationDao {
}
}
public void sendNotificationToInstructorManager(Map<String, String> placeHolders, ApplicationEvaluationEntity applicationEvaluationEntity, NotificationTypeEnum notificationTypeEnum) {
List<UserEntity> userEntities=userRepository.findByRoleEntity_RoleTypeAndHubId(RoleStatusEnum.ROLE_INSTRUCTOR_MANAGER.getValue(),applicationEvaluationEntity.getAssignedApplicationsEntity().getApplication().getHubId());
for (UserEntity user:userEntities) {
Long instructorId=user.getId();
ApplicationEntity application = applicationService.validateApplication(applicationEvaluationEntity.getApplicationId());
if (instructorId != null) {
NotificationReq notificationreq = createNotificationReq(notificationTypeEnum.getValue(), placeHolders, instructorId, application.getUserWithCompany(),
null);
sendNotification(notificationreq);
}
}
}
public List<Long> getAllCompanyIdsForUser(Long userId) {
return userWithCompanyRepository.findActiveCompanyIdsByUserId(userId);