From ca3b1b5fc025e277148dfe22e574e27ee1a11d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EA=B4=80=EA=B7=9C?= Date: Fri, 7 Aug 2026 18:28:55 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20Version=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EB=A9=94=EC=86=8C=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../in/koreatech/koin/domain/version/model/Version.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/in/koreatech/koin/domain/version/model/Version.java b/src/main/java/in/koreatech/koin/domain/version/model/Version.java index 9b7e15b26d..6c9a0ea8d6 100644 --- a/src/main/java/in/koreatech/koin/domain/version/model/Version.java +++ b/src/main/java/in/koreatech/koin/domain/version/model/Version.java @@ -68,6 +68,12 @@ public void update(Clock clock) { version = generateVersionName(clock); } + public void update(String version, String title, String content) { + this.version = version; + this.title = title; + this.content = content; + } + private String generateVersionName(Clock clock) { String year = Integer.toString(LocalDate.now().getYear()); String padding = "0_"; From 4ebde593c86d48ff73b061a71b01b1c2306b4130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EA=B4=80=EA=B7=9C?= Date: Fri, 7 Aug 2026 18:29:24 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=EB=B2=84=EC=A0=84=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EB=A9=94=EC=86=8C=EB=93=9C=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 셔틀 버스 등 버전 업데이트 로직 추가 --- .../version/service/AdminVersionService.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java b/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java index 08d1440a71..59dac0945f 100644 --- a/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java +++ b/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java @@ -10,11 +10,10 @@ import in.koreatech.koin.admin.version.dto.AdminVersionResponse; import in.koreatech.koin.admin.version.dto.AdminVersionUpdateRequest; import in.koreatech.koin.admin.version.dto.AdminVersionsResponse; -import in.koreatech.koin.admin.version.exception.VersionNotSupportedException; import in.koreatech.koin.admin.version.repository.AdminVersionRepository; +import in.koreatech.koin.common.model.Criteria; import in.koreatech.koin.domain.version.model.Version; import in.koreatech.koin.domain.version.model.VersionType; -import in.koreatech.koin.common.model.Criteria; import lombok.RequiredArgsConstructor; @Service @@ -44,15 +43,20 @@ public AdminVersionResponse getVersion(String type) { @Transactional public void updateVersion(String type, AdminVersionUpdateRequest request) { VersionType versionType = VersionType.from(type); - if (!versionType.isPlatform()) { - throw VersionNotSupportedException.withDetail("type: " + versionType); + if (versionType.isPlatform()) { + Version currentVersion = adminVersionRepository.getByTypeAndIsPrevious(versionType, false); + currentVersion.toPreviousVersion(); + + Version newVersion = Version.of(versionType, request); + adminVersionRepository.save(newVersion); + } else { + Version currentVersion = adminVersionRepository.getByTypeAndIsPrevious(versionType, false); + currentVersion.update( + request.version(), + request.title(), + request.content() + ); } - - Version currentVersion = adminVersionRepository.getByTypeAndIsPrevious(versionType, false); - currentVersion.toPreviousVersion(); - - Version newVersion = Version.of(versionType, request); - adminVersionRepository.save(newVersion); } public AdminVersionHistoryResponse getHistory(String type, Integer page, Integer limit) { From 03d86c9537feeb98c38a94f99e252b738ff54d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EA=B4=80=EA=B7=9C?= Date: Fri, 7 Aug 2026 18:29:57 +0900 Subject: [PATCH 3/4] =?UTF-8?q?refactor:=20=EB=B6=84=EB=A6=AC=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../koin/admin/version/service/AdminVersionService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java b/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java index 59dac0945f..2e7455fbd1 100644 --- a/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java +++ b/src/main/java/in/koreatech/koin/admin/version/service/AdminVersionService.java @@ -43,14 +43,13 @@ public AdminVersionResponse getVersion(String type) { @Transactional public void updateVersion(String type, AdminVersionUpdateRequest request) { VersionType versionType = VersionType.from(type); + Version currentVersion = adminVersionRepository.getByTypeAndIsPrevious(versionType, false); if (versionType.isPlatform()) { - Version currentVersion = adminVersionRepository.getByTypeAndIsPrevious(versionType, false); currentVersion.toPreviousVersion(); Version newVersion = Version.of(versionType, request); adminVersionRepository.save(newVersion); } else { - Version currentVersion = adminVersionRepository.getByTypeAndIsPrevious(versionType, false); currentVersion.update( request.version(), request.title(), From e2a8a87065a584f46b5941012b338302d99700b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EA=B4=80=EA=B7=9C?= Date: Fri, 7 Aug 2026 18:33:28 +0900 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20=EC=8A=A4=EC=9B=A8=EA=B1=B0=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EC=84=A4=EB=AA=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../koin/admin/version/controller/AdminVersionApi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/in/koreatech/koin/admin/version/controller/AdminVersionApi.java b/src/main/java/in/koreatech/koin/admin/version/controller/AdminVersionApi.java index 551c4b2faa..e5d0daad0f 100644 --- a/src/main/java/in/koreatech/koin/admin/version/controller/AdminVersionApi.java +++ b/src/main/java/in/koreatech/koin/admin/version/controller/AdminVersionApi.java @@ -81,7 +81,7 @@ ResponseEntity getVersion( @PutMapping("/{type}") @AdminActivityLogging(domain = VERSION) ResponseEntity updateVersion( - @Parameter(description = "android, ios, android_owner") @PathVariable("type") String type, + @Parameter(description = "android, ios, android_owner, timetable, shuttle_bus_timetable, city_bus_timetable, express_bus_timetable") @PathVariable("type") String type, @RequestBody @Valid AdminVersionUpdateRequest adminVersionUpdateRequest, @Auth(permit = {ADMIN}) Integer adminId );