From 4567412a180203434c3812ab0705445a4d443b5f Mon Sep 17 00:00:00 2001 From: gilgeunwoo Date: Thu, 21 Dec 2023 22:21:49 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat=20::=20=EC=A3=BC=EA=B0=84=20=ED=96=89?= =?UTF-8?q?=EC=82=AC=20=EC=9D=BC=EC=A0=95=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/CreateWeeklyEventScheduleRequest.kt | 8 +++++++ .../model/WeeklyEventSchedule.kt | 2 +- .../event_schedule/spi/EventSchedulePort.kt | 1 + .../CreateWeeklyEventScheduleUseCase.kt | 21 +++++++++++++++++++ .../EvenSchedulePersistenceAdapter.kt | 5 +++++ .../presentation/EventScheduleWebAdapter.kt | 11 ++++++++++ .../CreateWeeklyEventScheduleWebRequest.kt | 20 ++++++++++++++++++ 7 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/dto/CreateWeeklyEventScheduleRequest.kt create mode 100644 JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/usecase/CreateWeeklyEventScheduleUseCase.kt create mode 100644 JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/dto/CreateWeeklyEventScheduleWebRequest.kt diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/dto/CreateWeeklyEventScheduleRequest.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/dto/CreateWeeklyEventScheduleRequest.kt new file mode 100644 index 0000000..a6feffc --- /dev/null +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/dto/CreateWeeklyEventScheduleRequest.kt @@ -0,0 +1,8 @@ +package com.kodomo.juganbbojjak.domain.event_schedule.dto + +import java.time.LocalDate + +data class CreateWeeklyEventScheduleRequest( + val startDate: LocalDate, + val endDate: LocalDate, +) diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/model/WeeklyEventSchedule.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/model/WeeklyEventSchedule.kt index efe4283..0f32e0b 100644 --- a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/model/WeeklyEventSchedule.kt +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/model/WeeklyEventSchedule.kt @@ -6,7 +6,7 @@ import java.util.UUID @Aggregate data class WeeklyEventSchedule( - val id: UUID, + val id: UUID = UUID.randomUUID(), val startDate: LocalDate, val endDate: LocalDate, ) \ No newline at end of file diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/spi/EventSchedulePort.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/spi/EventSchedulePort.kt index 2f876e1..e08d6dc 100644 --- a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/spi/EventSchedulePort.kt +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/spi/EventSchedulePort.kt @@ -19,4 +19,5 @@ interface QueryEventSchedulePort { interface CommandEventSchedulePort { fun saveAllEventSchedule(eventSchedule: List) fun saveEventSchedule(eventSchedule: EventSchedule) + fun saveWeeklyEventSchedule(weeklyEventSchedule: WeeklyEventSchedule): WeeklyEventSchedule } \ No newline at end of file diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/usecase/CreateWeeklyEventScheduleUseCase.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/usecase/CreateWeeklyEventScheduleUseCase.kt new file mode 100644 index 0000000..7825de5 --- /dev/null +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/usecase/CreateWeeklyEventScheduleUseCase.kt @@ -0,0 +1,21 @@ +package com.kodomo.juganbbojjak.domain.event_schedule.usecase + +import com.kodomo.juganbbojjak.common.annotation.UseCase +import com.kodomo.juganbbojjak.domain.event_schedule.dto.CreateWeeklyEventScheduleRequest +import com.kodomo.juganbbojjak.domain.event_schedule.model.WeeklyEventSchedule +import com.kodomo.juganbbojjak.domain.event_schedule.spi.CommandEventSchedulePort + +@UseCase +class CreateWeeklyEventScheduleUseCase( + private val commandEventSchedulePort: CommandEventSchedulePort, +) { + + fun execute(request: CreateWeeklyEventScheduleRequest) { + commandEventSchedulePort.saveWeeklyEventSchedule( + WeeklyEventSchedule( + startDate = request.startDate, + endDate = request.endDate, + ) + ) + } +} \ No newline at end of file diff --git a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/persistence/EvenSchedulePersistenceAdapter.kt b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/persistence/EvenSchedulePersistenceAdapter.kt index 66c9496..e542871 100644 --- a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/persistence/EvenSchedulePersistenceAdapter.kt +++ b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/persistence/EvenSchedulePersistenceAdapter.kt @@ -56,12 +56,17 @@ class EvenSchedulePersistenceAdapter( eventScheduleJpaRepository.save(eventScheduleMapper.toEntity(eventSchedule)) } + override fun saveWeeklyEventSchedule(weeklyEventSchedule: WeeklyEventSchedule): WeeklyEventSchedule = weeklyEventScheduleMapper.toDomain( + weeklyEventScheduleJpaRepository.save(weeklyEventScheduleMapper.toEntity(weeklyEventSchedule)) + )!! + //==condition==// private fun eqUserId(userId: UUID?): BooleanExpression? = if (userId != null) eventScheduleEntity.userEntity.id.eq(userId) else null + override fun queryAllEventScheduleList(): List { val weeklyEventScheduleEntity = weeklyEventScheduleJpaRepository.findAllByOrderByEndDateDesc() diff --git a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/EventScheduleWebAdapter.kt b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/EventScheduleWebAdapter.kt index e0a53a7..9d7e4a5 100644 --- a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/EventScheduleWebAdapter.kt +++ b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/EventScheduleWebAdapter.kt @@ -2,8 +2,10 @@ package com.kodomo.juganbbojjak.domain.event_schedule.presentation import com.kodomo.juganbbojjak.domain.event_schedule.dto.response.QueryEventScheduleDetailResponse import com.kodomo.juganbbojjak.domain.event_schedule.presentation.dto.CreateEvenScheduleWebRequest +import com.kodomo.juganbbojjak.domain.event_schedule.presentation.dto.CreateWeeklyEventScheduleWebRequest import com.kodomo.juganbbojjak.domain.event_schedule.presentation.dto.UpdateEventScheduleWebRequest import com.kodomo.juganbbojjak.domain.event_schedule.usecase.CreateEvenScheduleUseCase +import com.kodomo.juganbbojjak.domain.event_schedule.usecase.CreateWeeklyEventScheduleUseCase import com.kodomo.juganbbojjak.domain.event_schedule.usecase.QueryEventScheduleDetailUseCase import com.kodomo.juganbbojjak.domain.event_schedule.usecase.UpdateEventScheduleUseCase import jakarta.validation.Valid @@ -24,6 +26,7 @@ class EventScheduleWebAdapter( private val createEvenScheduleUseCase: CreateEvenScheduleUseCase, private val queryEventScheduleDetailUseCase: QueryEventScheduleDetailUseCase, private val updateEventScheduleUseCase: UpdateEventScheduleUseCase, + private val createWeeklyEventScheduleUseCase: CreateWeeklyEventScheduleUseCase, ) { @ResponseStatus(HttpStatus.CREATED) @@ -48,4 +51,12 @@ class EventScheduleWebAdapter( ) { updateEventScheduleUseCase.execute(eventScheduleId, request.toDomainRequest()) } + + @ResponseStatus(HttpStatus.CREATED) + @PostMapping + fun createWeeklyEventSchedule( + @RequestBody @Valid request: CreateWeeklyEventScheduleWebRequest, + ) { + createWeeklyEventScheduleUseCase.execute(request.toDomainRequest()) + } } \ No newline at end of file diff --git a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/dto/CreateWeeklyEventScheduleWebRequest.kt b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/dto/CreateWeeklyEventScheduleWebRequest.kt new file mode 100644 index 0000000..e238c60 --- /dev/null +++ b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/event_schedule/presentation/dto/CreateWeeklyEventScheduleWebRequest.kt @@ -0,0 +1,20 @@ +package com.kodomo.juganbbojjak.domain.event_schedule.presentation.dto + +import com.kodomo.juganbbojjak.domain.event_schedule.dto.CreateWeeklyEventScheduleRequest +import org.jetbrains.annotations.NotNull +import java.time.LocalDate + +data class CreateWeeklyEventScheduleWebRequest( + + @field:NotNull + val startDate: LocalDate, + + @field:NotNull + val endDate: LocalDate, +) { + + fun toDomainRequest() = CreateWeeklyEventScheduleRequest( + startDate = startDate, + endDate = endDate, + ) +} From 7a4a05243d9c3d62adb04a9f61a01e828ef3530c Mon Sep 17 00:00:00 2001 From: gilgeunwoo Date: Thu, 21 Dec 2023 22:22:20 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat=20::=20=EC=A3=BC=EA=B0=84=20=EC=97=85?= =?UTF-8?q?=EB=AC=B4=20=EB=B3=B4=EA=B3=A0=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/CreateWeeklyWorkReportRequest.kt | 8 +++++++ .../work_report/spi/WeeklyWorkReportPort.kt | 2 +- .../domain/work_report/spi/WorkReportPort.kt | 1 + .../usecase/CreateWeeklyWorkReportUseCase.kt | 21 +++++++++++++++++++ .../WeeklyWorkReportPersistenceAdapter.kt | 4 ++++ .../presentation/WorkReportWebAdapter.kt | 12 ++++++++++- .../dto/CreateWeeklyWorkReportWebRequest.kt | 20 ++++++++++++++++++ 7 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/dto/CreateWeeklyWorkReportRequest.kt create mode 100644 JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/usecase/CreateWeeklyWorkReportUseCase.kt create mode 100644 JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/dto/CreateWeeklyWorkReportWebRequest.kt diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/dto/CreateWeeklyWorkReportRequest.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/dto/CreateWeeklyWorkReportRequest.kt new file mode 100644 index 0000000..7edc8cd --- /dev/null +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/dto/CreateWeeklyWorkReportRequest.kt @@ -0,0 +1,8 @@ +package com.kodomo.juganbbojjak.domain.work_report.dto + +import java.time.LocalDate + +data class CreateWeeklyWorkReportRequest( + val startDate: LocalDate, + val endDate: LocalDate, +) diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WeeklyWorkReportPort.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WeeklyWorkReportPort.kt index 609f1c6..aa95033 100644 --- a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WeeklyWorkReportPort.kt +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WeeklyWorkReportPort.kt @@ -6,7 +6,7 @@ import java.util.UUID interface WeeklyWorkReportPort : CommandWeeklyWorkReportPort, QueryWeeklyWorkReportPort interface CommandWeeklyWorkReportPort { - + fun saveWeeklyWorkReport(weeklyWorkReport: WeeklyWorkReport) } interface QueryWeeklyWorkReportPort { diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WorkReportPort.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WorkReportPort.kt index 2140a0f..244b67f 100644 --- a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WorkReportPort.kt +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/spi/WorkReportPort.kt @@ -1,5 +1,6 @@ package com.kodomo.juganbbojjak.domain.work_report.spi +import com.kodomo.juganbbojjak.domain.work_report.model.WeeklyWorkReport import com.kodomo.juganbbojjak.domain.work_report.model.WorkReport import java.util.UUID diff --git a/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/usecase/CreateWeeklyWorkReportUseCase.kt b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/usecase/CreateWeeklyWorkReportUseCase.kt new file mode 100644 index 0000000..c0e0063 --- /dev/null +++ b/JuGanBbojjak-application/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/usecase/CreateWeeklyWorkReportUseCase.kt @@ -0,0 +1,21 @@ +package com.kodomo.juganbbojjak.domain.work_report.usecase + +import com.kodomo.juganbbojjak.common.annotation.UseCase +import com.kodomo.juganbbojjak.domain.work_report.dto.CreateWeeklyWorkReportRequest +import com.kodomo.juganbbojjak.domain.work_report.model.WeeklyWorkReport +import com.kodomo.juganbbojjak.domain.work_report.spi.CommandWeeklyWorkReportPort + +@UseCase +class CreateWeeklyWorkReportUseCase( + private val commandWorkReportPort: CommandWeeklyWorkReportPort, +) { + + fun execute(request: CreateWeeklyWorkReportRequest) { + commandWorkReportPort.saveWeeklyWorkReport( + WeeklyWorkReport( + startDate = request.startDate, + endDate = request.endDate, + ) + ) + } +} \ No newline at end of file diff --git a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/persistence/WeeklyWorkReportPersistenceAdapter.kt b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/persistence/WeeklyWorkReportPersistenceAdapter.kt index 4826330..16aab78 100644 --- a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/persistence/WeeklyWorkReportPersistenceAdapter.kt +++ b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/persistence/WeeklyWorkReportPersistenceAdapter.kt @@ -15,6 +15,10 @@ class WeeklyWorkReportPersistenceAdapter( private val weeklyWorkReportMapper: WeeklyWorkReportMapper ) : WeeklyWorkReportPort { + override fun saveWeeklyWorkReport(weeklyWorkReport: WeeklyWorkReport) { + weeklyWorkReportRepository.save(weeklyWorkReportMapper.toEntity(weeklyWorkReport)) + } + override fun queryWeeklyWorkReportById(weeklyWorkReportId: UUID): WeeklyWorkReport = weeklyWorkReportMapper.toDomain( weeklyWorkReportRepository.findByIdOrNull(weeklyWorkReportId) diff --git a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/WorkReportWebAdapter.kt b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/WorkReportWebAdapter.kt index acec02e..f361b0a 100644 --- a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/WorkReportWebAdapter.kt +++ b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/WorkReportWebAdapter.kt @@ -1,8 +1,10 @@ package com.kodomo.juganbbojjak.domain.work_report.presentation import com.kodomo.juganbbojjak.domain.work_report.dto.response.QueryWorkReportDetailsResponse +import com.kodomo.juganbbojjak.domain.work_report.presentation.dto.CreateWeeklyWorkReportWebRequest import com.kodomo.juganbbojjak.domain.work_report.presentation.dto.CreateWorkReportWebRequest import com.kodomo.juganbbojjak.domain.work_report.presentation.dto.UpdateWorkReportWebRequest +import com.kodomo.juganbbojjak.domain.work_report.usecase.CreateWeeklyWorkReportUseCase import com.kodomo.juganbbojjak.domain.work_report.usecase.CreateWorkReportUseCase import com.kodomo.juganbbojjak.domain.work_report.usecase.QueryWorkReportDetailsUseCase import com.kodomo.juganbbojjak.domain.work_report.usecase.UpdateWorkReportUseCase @@ -23,7 +25,8 @@ import java.util.UUID class WorkReportWebAdapter( private val createWorkReportUseCase: CreateWorkReportUseCase, private val queryWorkReportDetailsUseCase: QueryWorkReportDetailsUseCase, - private val updateWorkReportUseCase: UpdateWorkReportUseCase + private val updateWorkReportUseCase: UpdateWorkReportUseCase, + private val createWeeklyWorkReportUseCase: CreateWeeklyWorkReportUseCase, ) { @ResponseStatus(HttpStatus.CREATED) @@ -45,4 +48,11 @@ class WorkReportWebAdapter( updateWorkReportUseCase.execute(request.toDomainRequest()) } + @ResponseStatus(HttpStatus.CREATED) + @PostMapping + fun createWeeklyWorkReport( + @RequestBody @Valid request: CreateWeeklyWorkReportWebRequest + ) { + createWeeklyWorkReportUseCase.execute(request.toDomainRequest()) + } } \ No newline at end of file diff --git a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/dto/CreateWeeklyWorkReportWebRequest.kt b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/dto/CreateWeeklyWorkReportWebRequest.kt new file mode 100644 index 0000000..4d36461 --- /dev/null +++ b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/domain/work_report/presentation/dto/CreateWeeklyWorkReportWebRequest.kt @@ -0,0 +1,20 @@ +package com.kodomo.juganbbojjak.domain.work_report.presentation.dto + +import com.kodomo.juganbbojjak.domain.work_report.dto.CreateWeeklyWorkReportRequest +import org.jetbrains.annotations.NotNull +import java.time.LocalDate + +data class CreateWeeklyWorkReportWebRequest( + + @field:NotNull + val startDate: LocalDate, + + @field:NotNull + val endDate: LocalDate, +) { + + fun toDomainRequest() = CreateWeeklyWorkReportRequest( + startDate = startDate, + endDate = endDate, + ) +} \ No newline at end of file From baa9c413ac06ed5d2221cd6e91c9590456f8f677 Mon Sep 17 00:00:00 2001 From: gilgeunwoo Date: Thu, 21 Dec 2023 22:22:30 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat=20::=20=EC=A0=91=EA=B7=BC=20=EA=B6=8C?= =?UTF-8?q?=ED=95=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kodomo/juganbbojjak/global/security/SecurityConfig.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/global/security/SecurityConfig.kt b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/global/security/SecurityConfig.kt index 9cde982..a909b68 100644 --- a/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/global/security/SecurityConfig.kt +++ b/JuGanBbojjak-infrastructure/src/main/kotlin/com/kodomo/juganbbojjak/global/security/SecurityConfig.kt @@ -34,9 +34,11 @@ class SecurityConfig( .requestMatchers(HttpMethod.POST, "/event_schedules/{weekly-event-schedule-id}").hasAuthority(USER.name) .requestMatchers(HttpMethod.GET, "/event_schedules/{weekly-event-schedule-id}").hasAnyAuthority(ADMIN.name, USER.name) .requestMatchers(HttpMethod.PUT, "/event_schedules/{event-schedule-id}").hasAnyAuthority(ADMIN.name, USER.name) + .requestMatchers(HttpMethod.POST, "/event_schedules").hasAuthority(ADMIN.name) .requestMatchers(HttpMethod.POST, "/work_report/{weekly-work-report-id}").hasAuthority(USER.name) .requestMatchers(HttpMethod.GET, "/work_report/{weekly-work-report-id}").hasAnyAuthority(USER.name, ADMIN.name) + .requestMatchers(HttpMethod.POST, "/work_report").hasAuthority(ADMIN.name) .requestMatchers(HttpMethod.GET, "/main").hasAnyAuthority(USER.name, ADMIN.name) .requestMatchers(HttpMethod.GET, "/main/latest_work").hasAuthority(USER.name)