Skip to content

Commit

Permalink
⚙️ :: (#develop) 학생은 돈 못보게
Browse files Browse the repository at this point in the history
  • Loading branch information
geunoo committed Apr 4, 2024
2 parents f7fa916 + cd31e84 commit bd715b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class QueryRecruitmentDetailResponse {
private final Boolean isApplicable;
private final boolean isBookmarked;

public static QueryRecruitmentDetailResponse of(RecruitmentDetailVO recruitmentDetail, List<RecruitAreaResponse> recruitAreas, Boolean isApplicable) {
public static QueryRecruitmentDetailResponse of(RecruitmentDetailVO recruitmentDetail, List<RecruitAreaResponse> recruitAreas, Boolean isApplicable, boolean authority) {
return QueryRecruitmentDetailResponse.builder()
.recruitmentId(recruitmentDetail.getRecruitmentId())
.companyId(recruitmentDetail.getCompanyId())
Expand All @@ -49,8 +49,8 @@ public static QueryRecruitmentDetailResponse of(RecruitmentDetailVO recruitmentD
.flexibleWorking(recruitmentDetail.isFlexibleWorking())
.requiredLicenses(recruitmentDetail.getRequiredLicenses())
.hiringProgress(recruitmentDetail.getHiringProgress())
.trainPay(recruitmentDetail.getTrainPay())
.pay(recruitmentDetail.getPay())
.trainPay(authority ? 0 : recruitmentDetail.getTrainPay())
.pay(authority ? "0" : recruitmentDetail.getPay())
.benefits(recruitmentDetail.getBenefits())
.military(recruitmentDetail.getMilitary())
.submitDocument(recruitmentDetail.getSubmitDocument())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public QueryRecruitmentDetailResponse execute(Long recruitId) {
return QueryRecruitmentDetailResponse.of(
recruitmentDetail,
recruitAreaResponses,
getApplicable(recruitmentDetail.isWinterIntern(), recruitment.getId())
getApplicable(recruitmentDetail.isWinterIntern(), recruitment.getId()),
checkAuthority()
);
}

Expand All @@ -54,4 +55,8 @@ private Boolean getApplicable(boolean winterIntern, long recruitmentId) {
}
return null;
}

private boolean checkAuthority() {
return securityPort.getCurrentUserAuthority().equals(Authority.STUDENT);
}
}

0 comments on commit bd715b7

Please sign in to comment.