diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/QueryRecruitmentDetailResponse.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/QueryRecruitmentDetailResponse.java index a6b270238..821674264 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/QueryRecruitmentDetailResponse.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/QueryRecruitmentDetailResponse.java @@ -37,7 +37,7 @@ public class QueryRecruitmentDetailResponse { private final Boolean isApplicable; private final boolean isBookmarked; - public static QueryRecruitmentDetailResponse of(RecruitmentDetailVO recruitmentDetail, List recruitAreas, Boolean isApplicable) { + public static QueryRecruitmentDetailResponse of(RecruitmentDetailVO recruitmentDetail, List recruitAreas, Boolean isApplicable, boolean authority) { return QueryRecruitmentDetailResponse.builder() .recruitmentId(recruitmentDetail.getRecruitmentId()) .companyId(recruitmentDetail.getCompanyId()) @@ -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()) diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/QueryRecruitmentDetailUseCase.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/QueryRecruitmentDetailUseCase.java index fac42eefe..5f4d1ec12 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/QueryRecruitmentDetailUseCase.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/QueryRecruitmentDetailUseCase.java @@ -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() ); } @@ -54,4 +55,8 @@ private Boolean getApplicable(boolean winterIntern, long recruitmentId) { } return null; } + + private boolean checkAuthority() { + return securityPort.getCurrentUserAuthority().equals(Authority.STUDENT); + } }