[#44] 매장 기능 도입 #45

Merged
pricelees merged 116 commits from feat/#44 into main 2025-09-20 03:15:06 +00:00
2 changed files with 15 additions and 13 deletions
Showing only changes of commit 2d08a20aff - Show all commits

View File

@ -69,16 +69,6 @@ class ScheduleService(
throw ScheduleException(ScheduleErrorCode.SCHEDULE_NOT_AVAILABLE)
}
@Transactional(readOnly = true)
fun findScheduleOverviewById(id: Long): ScheduleOverviewResponse {
val overview: ScheduleOverview = scheduleRepository.findOverviewByIdOrNull(id) ?: run {
log.warn { "[ScheduleService.findScheduleOverview] 일정 개요 조회 실패: id=$id" }
throw ScheduleException(ScheduleErrorCode.SCHEDULE_NOT_FOUND)
}
return overview.toOverviewResponse()
}
// ========================================
// All-Admin (본사, 매장 모두 사용가능)
// ========================================
@ -181,6 +171,16 @@ class ScheduleService(
}
}
@Transactional(readOnly = true)
fun findScheduleOverviewById(id: Long): ScheduleOverviewResponse {
val overview: ScheduleOverview = scheduleRepository.findOverviewByIdOrNull(id) ?: run {
log.warn { "[ScheduleService.findScheduleOverview] 일정 개요 조회 실패: id=$id" }
throw ScheduleException(ScheduleErrorCode.SCHEDULE_NOT_FOUND)
}
return overview.toOverviewResponse()
}
// ========================================
// Common (공통 메서드)
// ========================================

View File

@ -338,13 +338,13 @@ class ReservationApiTest(
runTest(
token = userToken,
on = {
get("/reservations/summary")
get("/reservations/overview")
},
expect = {
statusCode(HttpStatus.OK.value())
body("data.reservations.size()", equalTo(3))
assertProperties(
props = setOf("id", "themeName", "date", "startAt", "status"),
props = setOf("id", "storeName", "themeName", "date", "startFrom", "endAt", "status"),
propsNameIfList = "reservations"
)
}
@ -596,7 +596,9 @@ class ReservationApiTest(
},
expect = {
statusCode(HttpStatus.OK.value())
assertProperties(props = setOf("id", "user", "applicationDateTime", "payment"))
assertProperties(props = setOf("id", "reserver", "user", "applicationDateTime", "payment"))
assertProperties(props = setOf("name", "contact", "participantCount", "requirement"), propsNameIfList = "reserver")
assertProperties(props = setOf("id", "name", "phone"), propsNameIfList = "user")
}
).also {
it.extract().path<Long>("data.id") shouldBe reservation.id