diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/CreateApplicationUseCase.java b/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/CreateApplicationUseCase.java index f4b460a49..f52a912ec 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/CreateApplicationUseCase.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/application/usecase/CreateApplicationUseCase.java @@ -28,6 +28,7 @@ public class CreateApplicationUseCase { public void execute(CreateApplicationRequest request, Long recruitmentId) { Student student = securityPort.getCurrentStudent(); + Recruitment recruitment = queryRecruitmentPort.queryRecruitmentById(recruitmentId) .orElseThrow(() -> RecruitmentNotFoundException.EXCEPTION); recruitment.checkIsApplicable(student.getGrade()); diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/StudentQueryRecruitmentsResponse.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/StudentQueryRecruitmentsResponse.java index 5cc5eea0d..47fed7a87 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/StudentQueryRecruitmentsResponse.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/dto/response/StudentQueryRecruitmentsResponse.java @@ -15,13 +15,18 @@ public class StudentQueryRecruitmentsResponse { @Getter @Builder public static class StudentRecruitmentResponse { - private Long recruitId; + private long id; + private String companyName; + private String companyProfileUrl; - private Integer trainPay; - private boolean military; - private Integer totalHiring; - private String jobCodeList; - private boolean isBookmarked; + + private int trainPay; + + private boolean militarySupport; + + private String hiringJobs; + + private boolean bookmarked; } } 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 4e59910c9..ab02789ab 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 @@ -18,17 +18,26 @@ public class TeacherQueryRecruitmentsResponse { @Getter @Builder public static class TeacherRecruitmentResponse { - private Long id; - private RecruitStatus recruitmentStatus; + private long id; + + private RecruitStatus status; + private String companyName; + private CompanyType companyType; - private String recruitmentJob; - private Integer recruitmentCount; - private Long applicationRequestedCount; - private Long applicationApprovedCount; - private LocalDate start; - private LocalDate end; - private Boolean militarySupport; - private Long companyId; + + private String hiringJobs; + + private long totalHiringCount; + + private long applicationRequestedCount; + + private long applicationApprovedCount; + + private LocalDate startDate; + + private LocalDate endDate; + + private long companyId; } } diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/QueryRecruitmentPort.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/QueryRecruitmentPort.java index b5fd6f0e2..4a0f37c7d 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/QueryRecruitmentPort.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/QueryRecruitmentPort.java @@ -5,7 +5,8 @@ import team.retum.jobis.domain.recruitment.model.RecruitArea; import team.retum.jobis.domain.recruitment.model.Recruitment; import team.retum.jobis.domain.recruitment.spi.vo.RecruitmentDetailVO; -import team.retum.jobis.domain.recruitment.spi.vo.RecruitmentVO; +import team.retum.jobis.domain.recruitment.spi.vo.StudentRecruitmentVO; +import team.retum.jobis.domain.recruitment.spi.vo.TeacherRecruitmentVO; import java.util.List; import java.util.Optional; @@ -25,9 +26,9 @@ public interface QueryRecruitmentPort { RecruitmentDetailVO queryRecruitmentDetailById(Long recruitmentId); - List queryStudentRecruitmentsByFilter(RecruitmentFilter filter); + List queryStudentRecruitmentsByFilter(RecruitmentFilter filter); - List queryTeacherRecruitmentsByFilter(RecruitmentFilter filter); + List queryTeacherRecruitmentsByFilter(RecruitmentFilter filter); List queryRecruitmentsByIdIn(List recruitmentIds); diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/StudentRecruitmentVO.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/StudentRecruitmentVO.java new file mode 100644 index 000000000..38e0e57f7 --- /dev/null +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/StudentRecruitmentVO.java @@ -0,0 +1,18 @@ +package team.retum.jobis.domain.recruitment.spi.vo; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public class StudentRecruitmentVO { + + private final long recruitmentId; + private final String companyName; + private final int trainPay; + private final boolean militarySupport; + private final String companyLogoUrl; + private final String jobCodes; + private final boolean isBookmarked; + +} 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/TeacherRecruitmentVO.java similarity index 57% rename from jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/RecruitmentVO.java rename to jobis-application/src/main/java/team/retum/jobis/domain/recruitment/spi/vo/TeacherRecruitmentVO.java index ddf87d92d..3cb60dc41 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/TeacherRecruitmentVO.java @@ -9,22 +9,18 @@ @Getter @AllArgsConstructor -public class RecruitmentVO { +public class TeacherRecruitmentVO { - private final Long recruitmentId; + private final long recruitmentId; private final RecruitStatus recruitStatus; private final LocalDate startDate; private final LocalDate endDate; private final String companyName; private final CompanyType companyType; - private final Integer trainPay; - private final boolean militarySupport; - private final String companyLogoUrl; private final String jobCodes; - private final Integer totalHiring; - private final Long requestedApplicationCount; - private final Long approvedApplicationCount; - private final Boolean isBookmarked; - private final Long companyId; + private final long totalHiringCount; + private final long requestedApplicationCount; + private final long approvedApplicationCount; + private final long companyId; } diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/StudentQueryRecruitmentsUseCase.java b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/StudentQueryRecruitmentsUseCase.java index 3012e03e7..91beb7042 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/StudentQueryRecruitmentsUseCase.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/recruitment/usecase/StudentQueryRecruitmentsUseCase.java @@ -43,14 +43,13 @@ public StudentQueryRecruitmentsResponse execute( queryRecruitmentPort.queryStudentRecruitmentsByFilter(recruitmentFilter).stream() .map( recruitment -> StudentRecruitmentResponse.builder() - .recruitId(recruitment.getRecruitmentId()) + .id(recruitment.getRecruitmentId()) .companyName(recruitment.getCompanyName()) .trainPay(recruitment.getTrainPay()) - .jobCodeList(recruitment.getJobCodes()) - .military(recruitment.isMilitarySupport()) + .hiringJobs(recruitment.getJobCodes()) + .militarySupport(recruitment.isMilitarySupport()) .companyProfileUrl(recruitment.getCompanyLogoUrl()) - .totalHiring(recruitment.getTotalHiring()) - .isBookmarked(recruitment.getIsBookmarked()) + .bookmarked(recruitment.isBookmarked()) .build() ).toList(); 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 a5cc94eaa..7657b7b2b 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 @@ -37,16 +37,15 @@ public TeacherQueryRecruitmentsResponse execute(String companyName, LocalDate st .map(recruitment -> TeacherRecruitmentResponse.builder() .id(recruitment.getRecruitmentId()) - .recruitmentStatus(recruitment.getRecruitStatus()) + .status(recruitment.getRecruitStatus()) .companyName(recruitment.getCompanyName()) .companyType(recruitment.getCompanyType()) - .start(recruitment.getStartDate()) - .end(recruitment.getEndDate()) - .militarySupport(recruitment.isMilitarySupport()) + .startDate(recruitment.getStartDate()) + .endDate(recruitment.getEndDate()) .applicationRequestedCount(recruitment.getRequestedApplicationCount()) .applicationApprovedCount(recruitment.getApprovedApplicationCount()) - .recruitmentCount(recruitment.getTotalHiring()) - .recruitmentJob(recruitment.getJobCodes()) + .totalHiringCount(recruitment.getTotalHiringCount()) + .hiringJobs(recruitment.getJobCodes()) .companyId(recruitment.getCompanyId()) .build() ).toList(); 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 f4c7b023f..fa517283f 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 @@ -22,10 +22,12 @@ import team.retum.jobis.domain.recruitment.persistence.repository.RecruitmentJpaRepository; import team.retum.jobis.domain.recruitment.persistence.repository.vo.QQueryRecruitAreaVO; import team.retum.jobis.domain.recruitment.persistence.repository.vo.QQueryRecruitmentDetailVO; -import team.retum.jobis.domain.recruitment.persistence.repository.vo.QQueryRecruitmentsVO; +import team.retum.jobis.domain.recruitment.persistence.repository.vo.QQueryStudentRecruitmentsVO; +import team.retum.jobis.domain.recruitment.persistence.repository.vo.QQueryTeacherRecruitmentsVO; import team.retum.jobis.domain.recruitment.spi.RecruitmentPort; import team.retum.jobis.domain.recruitment.spi.vo.RecruitmentDetailVO; -import team.retum.jobis.domain.recruitment.spi.vo.RecruitmentVO; +import team.retum.jobis.domain.recruitment.spi.vo.StudentRecruitmentVO; +import team.retum.jobis.domain.recruitment.spi.vo.TeacherRecruitmentVO; import java.time.LocalDate; import java.util.List; @@ -54,27 +56,19 @@ public class RecruitmentPersistenceAdapter implements RecruitmentPort { private final RecruitAreaCodeMapper recruitAreaCodeMapper; @Override - public List queryStudentRecruitmentsByFilter(RecruitmentFilter filter) { + public List queryStudentRecruitmentsByFilter(RecruitmentFilter filter) { StringExpression recruitJobsPath = Expressions.stringTemplate("group_concat({0})", codeEntity.keyword); return queryFactory .select( - new QQueryRecruitmentsVO( + new QQueryStudentRecruitmentsVO( recruitmentEntity.id, - recruitmentEntity.status, - recruitmentEntity.recruitDate.startDate, - recruitmentEntity.recruitDate.finishDate, companyEntity.name, - companyEntity.type, recruitmentEntity.payInfo.trainPay, recruitmentEntity.militarySupport, companyEntity.companyLogoUrl, recruitJobsPath, - recruitAreaEntity.hiredCount.sum(), - Expressions.ZERO.longValue(), - Expressions.ZERO.longValue(), - bookmarkEntity.recruitment.id.isNotNull(), - companyEntity.id + bookmarkEntity.recruitment.id.isNotNull() ) ) .from(recruitmentEntity) @@ -94,8 +88,6 @@ public List queryStudentRecruitmentsByFilter(RecruitmentFilter fi .join(recruitAreaCodeEntity.code, codeEntity) .where( eqYear(filter.getYear()), - betweenRecruitDate(filter.getStartDate(), filter.getEndDate()), - eqRecruitStatus(filter.getStatus()), containsName(filter.getCompanyName()), containsCodes(filter.getCodes()), eqWinterIntern(filter.getWinterIntern()) @@ -105,33 +97,29 @@ public List queryStudentRecruitmentsByFilter(RecruitmentFilter fi .orderBy(recruitmentEntity.createdAt.desc()) .groupBy(recruitmentEntity.id) .fetch().stream() - .map(RecruitmentVO.class::cast) + .map(StudentRecruitmentVO.class::cast) .toList(); } @Override - public List queryTeacherRecruitmentsByFilter(RecruitmentFilter filter) { + public List queryTeacherRecruitmentsByFilter(RecruitmentFilter filter) { QApplicationEntity requestedApplication = new QApplicationEntity("requestedApplication"); QApplicationEntity approvedApplication = new QApplicationEntity("approvedApplication"); StringExpression recruitJobsPath = Expressions.stringTemplate("group_concat({0})", codeEntity.keyword); return queryFactory .select( - new QQueryRecruitmentsVO( + new QQueryTeacherRecruitmentsVO( recruitmentEntity.id, recruitmentEntity.status, recruitmentEntity.recruitDate.startDate, recruitmentEntity.recruitDate.finishDate, companyEntity.name, companyEntity.type, - recruitmentEntity.payInfo.trainPay, - recruitmentEntity.militarySupport, - companyEntity.companyLogoUrl, recruitJobsPath, - recruitAreaEntity.hiredCount.sum(), + recruitAreaEntity.hiredCount.sum().divide(recruitAreaEntity.hiredCount.count()).longValue(), requestedApplication.countDistinct(), approvedApplication.countDistinct(), - Expressions.asBoolean(false), companyEntity.id ) ) @@ -167,7 +155,7 @@ public List queryTeacherRecruitmentsByFilter(RecruitmentFilter fi .orderBy(recruitmentEntity.createdAt.desc()) .groupBy(recruitmentEntity.id) .fetch().stream() - .map(RecruitmentVO.class::cast) + .map(TeacherRecruitmentVO.class::cast) .toList(); } @@ -217,8 +205,7 @@ public Long getRecruitmentCountByFilter(RecruitmentFilter filter) { eqWinterIntern(filter.getWinterIntern()) ) .fetchOne(); - } - else { + } else { return queryFactory .select(recruitmentEntity.count()) .from(recruitmentEntity) 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 deleted file mode 100644 index c36a6da71..000000000 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryRecruitmentsVO.java +++ /dev/null @@ -1,24 +0,0 @@ -package team.retum.jobis.domain.recruitment.persistence.repository.vo; - -import com.querydsl.core.annotations.QueryProjection; -import lombok.Getter; -import team.retum.jobis.domain.company.model.CompanyType; -import team.retum.jobis.domain.recruitment.model.RecruitStatus; -import team.retum.jobis.domain.recruitment.spi.vo.RecruitmentVO; - -import java.time.LocalDate; - -@Getter -public class QueryRecruitmentsVO extends RecruitmentVO { - - @QueryProjection - public QueryRecruitmentsVO(Long recruitmentId, RecruitStatus recruitStatus, LocalDate startDate, - LocalDate endDate, String companyName, CompanyType companyType, - Integer trainPay, boolean militarySupport, String companyLogoUrl, - String jobCodes, Integer totalHiring, Long requestedApplicationCount, - Long approvedApplicationCount, Boolean isBookmarked, Long companyId) { - super(recruitmentId, recruitStatus, startDate, endDate, companyName, - companyType, trainPay, militarySupport, companyLogoUrl, jobCodes, - totalHiring, requestedApplicationCount, approvedApplicationCount, isBookmarked, companyId); - } -} diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryStudentRecruitmentsVO.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryStudentRecruitmentsVO.java new file mode 100644 index 000000000..3ae70fd52 --- /dev/null +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryStudentRecruitmentsVO.java @@ -0,0 +1,14 @@ +package team.retum.jobis.domain.recruitment.persistence.repository.vo; + +import com.querydsl.core.annotations.QueryProjection; +import team.retum.jobis.domain.recruitment.spi.vo.StudentRecruitmentVO; + +public class QueryStudentRecruitmentsVO extends StudentRecruitmentVO { + + @QueryProjection + public QueryStudentRecruitmentsVO(long recruitmentId, String companyName, int trainPay, + boolean militarySupport, String companyLogoUrl, String jobCodes, + boolean isBookmarked) { + super(recruitmentId, companyName, trainPay, militarySupport, companyLogoUrl, jobCodes, isBookmarked); + } +} diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryTeacherRecruitmentsVO.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryTeacherRecruitmentsVO.java new file mode 100644 index 000000000..54e54089f --- /dev/null +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/vo/QueryTeacherRecruitmentsVO.java @@ -0,0 +1,25 @@ +package team.retum.jobis.domain.recruitment.persistence.repository.vo; + +import com.querydsl.core.annotations.QueryProjection; +import lombok.Getter; +import team.retum.jobis.domain.company.model.CompanyType; +import team.retum.jobis.domain.recruitment.model.RecruitStatus; +import team.retum.jobis.domain.recruitment.spi.vo.TeacherRecruitmentVO; + +import java.time.LocalDate; + +@Getter +public class QueryTeacherRecruitmentsVO extends TeacherRecruitmentVO { + + @QueryProjection + public QueryTeacherRecruitmentsVO(long recruitmentId, RecruitStatus recruitStatus, + LocalDate startDate, LocalDate endDate, String companyName, + CompanyType companyType, String jobCodes, long totalHiring, + long requestedApplicationCount, long approvedApplicationCount, + long companyId) { + super(recruitmentId, recruitStatus, startDate, endDate, + companyName, companyType, jobCodes, totalHiring, + requestedApplicationCount, approvedApplicationCount, + companyId); + } +} diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java index 9c5c28196..f2637c01b 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java @@ -48,7 +48,7 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .antMatchers(HttpMethod.GET, "/bugs/{bug-report-id}").hasAuthority(DEVELOPER.name()) .antMatchers(HttpMethod.POST, "/bugs").hasAuthority(STUDENT.name()) - //students + // students .antMatchers(HttpMethod.GET, "/students/my").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) .antMatchers(HttpMethod.POST, "/students").permitAll() .antMatchers(HttpMethod.PATCH, "/students//forgotten_password").permitAll() @@ -57,7 +57,7 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .antMatchers(HttpMethod.GET, "/students/password").hasAuthority(STUDENT.name()) .antMatchers(HttpMethod.PATCH, "/students/password").hasAuthority(STUDENT.name()) - //applications + // applications .antMatchers(HttpMethod.GET, "/applications").hasAuthority(TEACHER.name()) .antMatchers(HttpMethod.GET, "/applications/count").hasAuthority(TEACHER.name()) .antMatchers(HttpMethod.GET, "/applications/employment/count").permitAll() @@ -70,7 +70,7 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .antMatchers(HttpMethod.PATCH, "/applications/train-date").hasAuthority(TEACHER.name()) .antMatchers(HttpMethod.PATCH, "/applications/reject/{application-id}").hasAuthority(TEACHER.name()) - //recruitments + // recruitments .antMatchers(HttpMethod.GET, "/recruitments/my").hasAuthority(COMPANY.name()) .antMatchers(HttpMethod.POST, "/recruitments").hasAuthority(COMPANY.name()) .antMatchers(HttpMethod.PATCH, "/recruitments/{recruitment-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) @@ -85,17 +85,17 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .antMatchers(HttpMethod.DELETE, "/recruitments/{recruitment-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) .antMatchers(HttpMethod.DELETE, "/recruitments/area/{recruit-area-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) - //bookmarks + // bookmarks .antMatchers(HttpMethod.POST, "/bookmarks/{recruitment-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) .antMatchers(HttpMethod.DELETE, "/bookmarks/{recruitment-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) .antMatchers(HttpMethod.GET, "/bookmarks").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - //auth + // auth .antMatchers(HttpMethod.POST, "/auth/code").permitAll() .antMatchers(HttpMethod.PATCH, "/auth/code").permitAll() .antMatchers(HttpMethod.PUT, "/auth/reissue").permitAll() - //companies + // companies .antMatchers(HttpMethod.GET, "/companies/teacher").hasAuthority(TEACHER.name()) .antMatchers(HttpMethod.GET, "/companies/teacher/count").hasAuthority(TEACHER.name()) .antMatchers(HttpMethod.PATCH, "/companies/type").hasAuthority(TEACHER.name()) @@ -112,17 +112,17 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .antMatchers(HttpMethod.GET, "/companies/employment/count").hasAuthority(TEACHER.name()) .antMatchers(HttpMethod.GET, "/companies/review").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - //users + // users .antMatchers(HttpMethod.POST, "/users/login").permitAll() - //files + // files .antMatchers(HttpMethod.POST, "/files").permitAll() .antMatchers(HttpMethod.DELETE, "/files").permitAll() - //code + // code .antMatchers(HttpMethod.GET, "/codes").permitAll() - //acceptance + // acceptance .antMatchers(HttpMethod.GET, "/acceptances/{company-id}").hasAuthority(TEACHER.name()) .antMatchers(HttpMethod.PATCH, "/acceptances/field-train/{application-id}").hasAnyAuthority(TEACHER.name()) .antMatchers(HttpMethod.PATCH, "/acceptances/contract-date").hasAuthority(TEACHER.name()) @@ -130,7 +130,7 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .antMatchers(HttpMethod.PATCH, "/acceptances/field-train").hasAnyAuthority(TEACHER.name()) .antMatchers(HttpMethod.DELETE, "/acceptances").hasAnyAuthority(TEACHER.name()) - //review + // review .antMatchers(HttpMethod.GET, "/reviews/{company-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) .antMatchers(HttpMethod.GET, "/reviews/details/{review-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) .antMatchers(HttpMethod.POST, "/reviews").hasAuthority(STUDENT.name())