Skip to content

Commit

Permalink
Merge pull request #161 from fourix4/dev
Browse files Browse the repository at this point in the history
결제 요청 오류 수정
  • Loading branch information
llynn97 authored Jul 26, 2024
2 parents 8617ba2 + ad430ba commit 537b58e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public Response<BookingResponseDto> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 537b58e

Please sign in to comment.