Skip to content

Commit

Permalink
[FIX] add docs and api format
Browse files Browse the repository at this point in the history
  • Loading branch information
wken5577 committed Apr 15, 2024
1 parent 3c26a64 commit 6d0ebc0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public interface MapStruct {
@Getter
public static class CheckListForm {
private Long checkId;
private String content;
private String contents;

public CheckListForm(Long checkId, String content) {
this.checkId = checkId;
this.content = content;
this.contents = content;
}

@Mapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,29 @@ public List<Application> getRecruitmentApplicants(Long recruitId) {
.findAllByRecruitmentIdWithUserAndRecruitStatusFetchJoinOrderByIdDesc(recruitId);
}

/**
* 지원서 목록 조회
* @param dto
* @return
*
* must query by questionId and checkListIds
* or questionId and search
*/
public Page<Application> findApplicationsWithAnswersAndUserWithFilter(GetRecruitmentApplicationsParam dto) {
Long recruitId = dto.getRecruitId();
Long questionId = dto.getQuestionId();
String search = dto.getSearch();
Pageable pageable = dto.getPageable();
List<Long> checkListIds = dto.getCheckListIds();

//question && checkList
if (questionId != null && !checkListIds.isEmpty() && search == null) {
return applicationAdminRepository.findAllByCheckList(recruitId, questionId, checkListIds, pageable);
//question && search
} else if (questionId != null && search != null && checkListIds.isEmpty()) {
return applicationAdminRepository.findAllByContainSearch(recruitId, questionId, search, pageable);
} else {
//not
return applicationAdminRepository.findByRecruitIdAndIsDeletedFalseOrderByIdDesc(recruitId, pageable);
}
}
Expand Down

0 comments on commit 6d0ebc0

Please sign in to comment.