Skip to content

Commit

Permalink
Merge pull request #193 from swyp3-babpool/fix/proHyundo
Browse files Browse the repository at this point in the history
hotfix: 일정 μƒνƒœ λ³€κ²½ mapper μˆ˜μ •
  • Loading branch information
proHyundo authored Sep 1, 2024
2 parents 0068201 + bc31f6e commit 4ff86c6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-server.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Spring Boot Gradle CICD (version 0.2.11)
name: Spring Boot Gradle CICD (version 0.2.12)

on:
push:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, "λ°₯μ•½ κ°€λŠ₯ν•œ 일정 μƒνƒœ 변경에 μ‹€νŒ¨ν•˜μ˜€μŠ΅λ‹ˆλ‹€.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public interface PossibleDateTimeRepository {
// ν…ŒμŠ€νŠΈ μ½”λ“œ μž‘μ„± μ™„λ£Œ
int updatePossibleDateTimeStatus(Long possibleDateTimeId, PossibleDateTimeStatusType status);

int updatePossibleDateTimeStatusFromAvailable(Long possibleDateTimeId, PossibleDateTimeStatusType status);

// ν…ŒμŠ€νŠΈ μ½”λ“œ μž‘μ„± μ™„λ£Œ
List<PossibleDateTime> findAllByUserId(Long userId);

Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/mapper/PossibleDateTimeMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,19 @@

<!-- ============================== UPDATE ============================== -->

<update id="updatePossibleDateTimeStatus">
<update id="updatePossibleDateTimeStatusFromAvailable">
UPDATE t_possible_datetime
SET possible_datetime_status = #{status}
WHERE possible_datetime_id = #{possibleDateTimeId}
AND possible_datetime_status = 'AVAILABLE';
</update>

<update id="updatePossibleDateTimeStatus">
UPDATE t_possible_datetime
SET possible_datetime_status = #{status}
WHERE possible_datetime_id = #{possibleDateTimeId};
</update>

<!-- ============================== DELETE ============================== -->

<delete id="deletePossibleDate">
Expand Down

0 comments on commit 4ff86c6

Please sign in to comment.