Resolved conflicts

This commit is contained in:
nisha
2024-10-22 19:54:51 +05:30
22 changed files with 575 additions and 22 deletions

View File

@@ -283,11 +283,11 @@ public class ApplicationDao {
// return applicationResponses;
// }
public List<ApplicationResponse> getAllApplications(UserEntity userEntity, Long callId, Long companyId) {
public List<ApplicationResponse> getAllApplications(UserEntity userEntity, Long callId, Long companyId,String status) {
log.info("Fetching applications for RoleType: {}", userEntity.getRoleEntity().getRoleType());
Specification<ApplicationEntity> spec = search(userEntity.getId(), callId, companyId);
Specification<ApplicationEntity> spec = search(userEntity.getId(), callId, companyId,status);
List<ApplicationEntity> applicationEntities = applicationRepository.findAll(spec);
@@ -297,7 +297,7 @@ public class ApplicationDao {
}
private Specification<ApplicationEntity> search(Long userId, Long callId, Long companyId) {
private Specification<ApplicationEntity> search(Long userId, Long callId, Long companyId,String status) {
return (root, query, builder) -> {
Boolean isBeneficiary = validator.checkIsBeneficiary();
Predicate predicate = builder.isFalse(root.get("isDeleted"));
@@ -310,6 +310,10 @@ public class ApplicationDao {
if (companyId != null) {
predicate = builder.and(predicate, builder.equal(root.get("company").get("id"), companyId));
}
if (status != null) {
predicate = builder.and(predicate, builder.equal(root.get("status"), status));
}
return predicate;
};
}