Skip to content

Commit

Permalink
Merge pull request #178 from kakao-tech-campus-2nd-step3/Develop
Browse files Browse the repository at this point in the history
[Master] [์ง€์›] feat : ๊ณ ์šฉ์ฃผ "๊ณ„์•ฝํ•˜๊ธฐ" ์ƒํƒœ ๋ณ€๊ฒฝ ์ถ”๊ฐ€
  • Loading branch information
LeeTaek2T authored Nov 13, 2024
2 parents 42b1efb + f6a8d44 commit 9e37887
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package team18.team18_be.apply.dto.response;

public record ApplierPerRecruitmentResponse(Long userId, String name, Long resumeId, Long applyId,
String applicantNation, String koreanLanguageLevel) {
String applicantNation, String koreanLanguageLevel, boolean contractExistence) {

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import team18.team18_be.apply.repository.ApplicationFormRepository;
import team18.team18_be.apply.repository.ApplyRepository;
import team18.team18_be.auth.entity.User;
import team18.team18_be.contract.repository.ContractRepository;
import team18.team18_be.recruitment.entity.Recruitment;
import team18.team18_be.recruitment.repository.RecruitmentRepository;
import team18.team18_be.resume.entity.Resume;
Expand All @@ -34,20 +35,22 @@ public class ApplyService {
private final CompanyRepository companyRepository;
private final ForeignerInformationRepository foreignerInformationRepository;
private final SignRepository signRepository;
private final ContractRepository contractRepository;


public ApplyService(ApplicationFormRepository applicationFormRepository,
ApplyRepository applyRepository, RecruitmentRepository recruitmentRepository,
ResumeRepository resumeRepository, CompanyRepository companyRepository,
ForeignerInformationRepository foreignerInformationRepository,
SignRepository signRepository) {
SignRepository signRepository, ContractRepository contractRepository) {
this.applicationFormRepository = applicationFormRepository;
this.applyRepository = applyRepository;
this.recruitmentRepository = recruitmentRepository;
this.resumeRepository = resumeRepository;
this.companyRepository = companyRepository;
this.foreignerInformationRepository = foreignerInformationRepository;
this.signRepository = signRepository;
this.contractRepository = contractRepository;
}

public Long createApplicationForm(ApplicationFormRequest applicationFormRequest,
Expand Down Expand Up @@ -88,9 +91,10 @@ public List<ApplierPerRecruitmentResponse> searchApplicant(Long recruitmentId, U
private ApplierPerRecruitmentResponse createApplierPerRecruitmentResponse(Apply apply) {
User applicantUser = apply.getUser();
Resume resume = resumeRepository.findByUser(applicantUser); //๊ทธ ์ง€์›์ž์˜ ์ด๋ ฅ์„œ ๊ฐ€์ ธ์˜ค๊ธฐ
boolean contractExistence = contractRepository.findByApplyId(apply.getId()).isPresent();
return new ApplierPerRecruitmentResponse(
applicantUser.getId(), applicantUser.getName(), resume.getResumeId(), apply.getId(),
"๋ฒ ํŠธ๋‚จ", resume.getKoreanLanguageLevel()
"๋ฒ ํŠธ๋‚จ", resume.getKoreanLanguageLevel(), contractExistence
);
}

Expand Down

0 comments on commit 9e37887

Please sign in to comment.