diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/TeacherQueryRecruitmentsResponse.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/TeacherQueryRecruitmentsResponse.java index ee83dd5bb..4e59910c9 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/TeacherQueryRecruitmentsResponse.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/TeacherQueryRecruitmentsResponse.java @@ -29,5 +29,6 @@ public static class TeacherRecruitmentResponse { private LocalDate start; private LocalDate end; private Boolean militarySupport; + private Long companyId; } } diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/RecruitmentVO.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/RecruitmentVO.java index 2d114d665..6bc894e0c 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/RecruitmentVO.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/RecruitmentVO.java @@ -25,5 +25,6 @@ public class RecruitmentVO { private final Long requestedApplicationCount; private final Long approvedApplicationCount; private final Long isBookmarked; + private final Long companyId; } diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/TeacherQueryRecruitmentsUseCase.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/TeacherQueryRecruitmentsUseCase.java index 1687fba94..74c639abf 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/TeacherQueryRecruitmentsUseCase.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/TeacherQueryRecruitmentsUseCase.java @@ -50,6 +50,7 @@ public TeacherQueryRecruitmentsResponse execute(String companyName, LocalDate st .applicationApprovedCount(recruitment.getApprovedApplicationCount()) .recruitmentCount(recruitment.getTotalHiring()) .recruitmentJob(getJobKeywords(recruitment.getJobCodes())) + .companyId(recruitment.getCompanyId()) .build() ).toList(); diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java index 444cfc520..e75e49318 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/ApplicationPersistenceAdapter.java @@ -200,7 +200,7 @@ public void deleteApplicationByIds(List applicationIds) { @Override public List queryApplicationsByIds(List applicationIds) { - return applicationJpaRepository.findAllByIdIn(applicationIds).stream() + return applicationJpaRepository.findByIdIn(applicationIds).stream() .map(applicationMapper::toDomain) .toList(); } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/repository/ApplicationJpaRepository.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/repository/ApplicationJpaRepository.java index 39e500b23..b9a22e8eb 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/repository/ApplicationJpaRepository.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/repository/ApplicationJpaRepository.java @@ -9,8 +9,7 @@ public interface ApplicationJpaRepository extends JpaRepository { - @Query("select a from ApplicationEntity a join fetch a.attachments where a.id in(?1)") - List findAllByIdIn(List applicationIds); + List findByIdIn(List applicationIds); void deleteByIdIn(List applicationIds); diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java index f26eaae29..635c5f649 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java @@ -3,7 +3,6 @@ import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.application.model.ApplicationStatus; -import team.retum.jobis.global.annotation.ValidListElements; import javax.validation.constraints.NotNull; import java.util.List; @@ -12,8 +11,8 @@ @NoArgsConstructor public class ChangeApplicationsStatusWebRequest { - @ValidListElements - private List applicationIds; + @NotNull + private List<@NotNull Long> applicationIds; @NotNull private ApplicationStatus status; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/RecruitmentPersistenceAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/RecruitmentPersistenceAdapter.java index 3400556ca..5cdb27498 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/RecruitmentPersistenceAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/RecruitmentPersistenceAdapter.java @@ -72,7 +72,8 @@ public List queryRecruitmentsByFilter(RecruitmentFilter filter) { recruitAreaEntity.hiredCount.sum(), requestedApplication.countDistinct(), approvedApplication.countDistinct(), - bookmarkEntity.count() + bookmarkEntity.count(), + companyEntity.id ) ) .from(recruitmentEntity) @@ -137,6 +138,7 @@ public Long getRecruitmentCountByFilter(RecruitmentFilter filter) { .select(recruitmentEntity.count()) .from(recruitmentEntity) .join(recruitmentEntity.company, companyEntity) + .join(recruitmentEntity.recruitAreas, recruitAreaEntity) .where( eqYear(filter.getYear()), betweenRecruitDate(filter.getStartDate(), filter.getEndDate()), diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryRecruitmentsVO.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryRecruitmentsVO.java index f4ed008b1..acf2237f9 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryRecruitmentsVO.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryRecruitmentsVO.java @@ -16,9 +16,9 @@ public QueryRecruitmentsVO(Long recruitmentId, RecruitStatus recruitStatus, Loca LocalDate endDate, String companyName, CompanyType companyType, Integer trainPay, boolean militarySupport, String companyLogoUrl, String jobCodes, Integer totalHiring, Long requestedApplicationCount, - Long approvedApplicationCount, Long isBookmarked) { + Long approvedApplicationCount, Long isBookmarked, Long companyId) { super(recruitmentId, recruitStatus, startDate, endDate, companyName, companyType, trainPay, militarySupport, companyLogoUrl, jobCodes, - totalHiring, requestedApplicationCount, approvedApplicationCount, isBookmarked); + totalHiring, requestedApplicationCount, approvedApplicationCount, isBookmarked, companyId); } }