Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import com.nowait.domaincorerdb.token.exception.BusinessException;
import com.nowait.domaincorerdb.user.exception.UserNotFoundException;
import com.nowait.domaincoreredis.rank.exception.MenuCounterUpdateException;
import com.nowait.domaincoreredis.reservation.exception.ReservationDataInconsistencyException;

import io.swagger.v3.oas.annotations.Hidden;
import lombok.RequiredArgsConstructor;
Expand Down Expand Up @@ -562,6 +563,14 @@ public ErrorResponse menuCounterUpdateException(MenuCounterUpdateException e, We
return new ErrorResponse(e.getMessage(), MENU_COUNTER_UPDATE.getCode());
}

@ResponseStatus(NOT_FOUND)
@ExceptionHandler(ReservationDataInconsistencyException.class)
public ErrorResponse reservationDataInconsistencyException(ReservationDataInconsistencyException e, WebRequest request) {
alarm(e, request);
log.error("reservationDataInconsistencyException", e);
return new ErrorResponse(e.getMessage(), RESERVATION_DATA_INCONSISTENCY.getCode());
}

/**
* * 그 외 예외처리
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ public void deleteWaiting(Long storeId, String userId) {
redisTemplate.opsForHash().delete(numberMapKey, userId);

// reservationNumber → userId 삭제
if (reservationNumber != null) {
redisTemplate.opsForHash().delete(userMapKey, reservationNumber);
}
redisTemplate.opsForHash().delete(userMapKey, reservationNumber);

String statusKey = RedisKeyUtils.buildWaitingStatusKeyPrefix() + storeId;
redisTemplate.opsForHash().delete(statusKey, userId);
Expand Down