diff --git a/src/main/java/com/example/CatchStudy/controller/BookingController.java b/src/main/java/com/example/CatchStudy/controller/BookingController.java index 06044a0..cab3633 100644 --- a/src/main/java/com/example/CatchStudy/controller/BookingController.java +++ b/src/main/java/com/example/CatchStudy/controller/BookingController.java @@ -35,9 +35,9 @@ public Response bookingSeats(@RequestBody BookingRequestDto User user = (User) authentication.getPrincipal(); Long userId = usersRepository.findByEmail(user.getUsername()).getUserId(); SeatBookingDto dto = null; - if (bookingRequestDto.getType() == SeatType.seat) { + if (bookingRequestDto.getType().equals(SeatType.seat)) { dto = bookingRequestDto.toSeatDto(); - } else if (bookingRequestDto.getType() == SeatType.room) { + } else if (bookingRequestDto.getType().equals(SeatType.room)) { dto = bookingRequestDto.toRoomDto(); } BookingResponseDto bookingResponseDto = paymentService.kakaoPayReady(dto, userId); diff --git a/src/main/java/com/example/CatchStudy/domain/dto/SeatBookingDto.java b/src/main/java/com/example/CatchStudy/domain/dto/SeatBookingDto.java index 3f26f43..22d396d 100644 --- a/src/main/java/com/example/CatchStudy/domain/dto/SeatBookingDto.java +++ b/src/main/java/com/example/CatchStudy/domain/dto/SeatBookingDto.java @@ -4,11 +4,13 @@ import com.example.CatchStudy.global.enums.SeatType; import lombok.AllArgsConstructor; import lombok.Getter; +import lombok.NoArgsConstructor; import java.time.LocalDateTime; @Getter @AllArgsConstructor +@NoArgsConstructor public class SeatBookingDto { Long cafeId; diff --git a/src/main/java/com/example/CatchStudy/domain/dto/request/BookingRequestDto.java b/src/main/java/com/example/CatchStudy/domain/dto/request/BookingRequestDto.java index 2e574ab..dfda0e3 100644 --- a/src/main/java/com/example/CatchStudy/domain/dto/request/BookingRequestDto.java +++ b/src/main/java/com/example/CatchStudy/domain/dto/request/BookingRequestDto.java @@ -5,11 +5,13 @@ import com.example.CatchStudy.global.enums.SeatType; import lombok.AllArgsConstructor; import lombok.Getter; +import lombok.NoArgsConstructor; import java.time.LocalDateTime; @Getter @AllArgsConstructor +@NoArgsConstructor public class BookingRequestDto { Long cafe_id; Long seat_id;