From bc31f6ee7d3e13e6be06d7f73761bc4a209d7890 Mon Sep 17 00:00:00 2001 From: proHyundo Date: Sun, 1 Sep 2024 23:33:30 +0900 Subject: [PATCH] =?UTF-8?q?hotfix(appointment):=20=EC=95=BD=EC=86=8D=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=B3=80=EA=B2=BD=20mapper=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github-actions-server.yaml | 2 +- .../application/PossibleDateTimeServiceImpl.java | 2 +- .../possibledatetime/dao/PossibleDateTimeRepository.java | 2 ++ src/main/resources/mapper/PossibleDateTimeMapper.xml | 8 +++++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-server.yaml b/.github/workflows/github-actions-server.yaml index 4dff14b..7ffc30f 100644 --- a/.github/workflows/github-actions-server.yaml +++ b/.github/workflows/github-actions-server.yaml @@ -1,4 +1,4 @@ -name: Spring Boot Gradle CICD (version 0.2.11) +name: Spring Boot Gradle CICD (version 0.2.12) on: push: diff --git a/src/main/java/com/swyp3/babpool/domain/possibledatetime/application/PossibleDateTimeServiceImpl.java b/src/main/java/com/swyp3/babpool/domain/possibledatetime/application/PossibleDateTimeServiceImpl.java index 649db57..1784b4d 100644 --- a/src/main/java/com/swyp3/babpool/domain/possibledatetime/application/PossibleDateTimeServiceImpl.java +++ b/src/main/java/com/swyp3/babpool/domain/possibledatetime/application/PossibleDateTimeServiceImpl.java @@ -43,7 +43,7 @@ public PossibleDateTime throwExceptionIfAppointmentAlreadyAcceptedAtSameTime(Lon @Override public boolean changeStatusAsReserved(Long possibleDateTimeId) { - int updatedRows = possibleDateTimeRepository.updatePossibleDateTimeStatus(possibleDateTimeId, PossibleDateTimeStatusType.RESERVED); + int updatedRows = possibleDateTimeRepository.updatePossibleDateTimeStatusFromAvailable(possibleDateTimeId, PossibleDateTimeStatusType.RESERVED); if (updatedRows != 1){ throw new PossibleDateTimeException(PossibleDateTimeErrorCode.POSSIBLE_DATETIME_STATUS_UPDATE_FAILED, "밥약 가능한 일정 상태 변경에 실패하였습니다."); } diff --git a/src/main/java/com/swyp3/babpool/domain/possibledatetime/dao/PossibleDateTimeRepository.java b/src/main/java/com/swyp3/babpool/domain/possibledatetime/dao/PossibleDateTimeRepository.java index 8646398..20003a8 100644 --- a/src/main/java/com/swyp3/babpool/domain/possibledatetime/dao/PossibleDateTimeRepository.java +++ b/src/main/java/com/swyp3/babpool/domain/possibledatetime/dao/PossibleDateTimeRepository.java @@ -28,6 +28,8 @@ public interface PossibleDateTimeRepository { // 테스트 코드 작성 완료 int updatePossibleDateTimeStatus(Long possibleDateTimeId, PossibleDateTimeStatusType status); + int updatePossibleDateTimeStatusFromAvailable(Long possibleDateTimeId, PossibleDateTimeStatusType status); + // 테스트 코드 작성 완료 List findAllByUserId(Long userId); diff --git a/src/main/resources/mapper/PossibleDateTimeMapper.xml b/src/main/resources/mapper/PossibleDateTimeMapper.xml index e54f4c6..4410532 100644 --- a/src/main/resources/mapper/PossibleDateTimeMapper.xml +++ b/src/main/resources/mapper/PossibleDateTimeMapper.xml @@ -189,13 +189,19 @@ - + UPDATE t_possible_datetime SET possible_datetime_status = #{status} WHERE possible_datetime_id = #{possibleDateTimeId} AND possible_datetime_status = 'AVAILABLE'; + + UPDATE t_possible_datetime + SET possible_datetime_status = #{status} + WHERE possible_datetime_id = #{possibleDateTimeId}; + +