Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto dev
  • Loading branch information
ujiiin committed Aug 23, 2024
2 parents 0b9f712 + 68d2478 commit c5f469a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ public class BookAdminController {
private final BookAdminService bookAdminService;

@GetMapping("/{showId}/prepare/book-admin")
@Operation(summary = "공연자 - 공연 준비 시 전체 예매자 조회 API",description = "공연자가 공연 준비 시에 전체 예매자를 조회하기 위한 API")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON200", description = "OK, 성공"),
})
@Parameter(name = "showId",description = "공연 id")
public ApiResponse<List<BookResponseDTO.bookInfoDTO>> getAllBookList(@PathVariable(name = "showId") Long showsId){
List<BookResponseDTO.bookInfoDTO> bookInfoList= bookAdminService.getAllBookList(showsId);
return ApiResponse.onSuccess(bookInfoList);
}

@GetMapping("/{showId}/prepare/book-admin/detail")
@Operation(summary = "공연자 - 공연 준비 시 예매자 관리 API",description = "공연자가 공연 준비 시에 예매자를 조회하기 위한 API")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON200", description = "OK, 성공"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static class bookInfoDTO{
Integer ticketNum;
String payment;
BookDetail detail;

//@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "Asia/Seoul")
LocalDateTime dateTime;
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/umc/ShowHoo/web/book/service/BookAdminService.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public class BookAdminService {
private final BookRepository bookRepository;
private final CancelBookRepository cancelBookRepository;

public List<BookResponseDTO.bookInfoDTO> getAllBookList(Long showsId){
Shows shows=showsRepository.findById(showsId)
.orElseThrow(()->new ShowsHandler(ErrorStatus.SHOW_NOT_FOUND));
List<Book> bookList=bookRepository.findAllByShows(shows);

return bookList.stream()
.map(BookConverter::toBookInfoDTO)
.collect(Collectors.toList());
}

public List<BookResponseDTO.bookInfoDTO> getBookInfoList(Long showsId, BookDetail detail){
Shows shows=showsRepository.findById(showsId)
.orElseThrow(()->new ShowsHandler(ErrorStatus.SHOW_NOT_FOUND));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public String logout(){
return "로그아웃";
}

@Value("https://66c81c7bad01400008a289e2--showhoo.netlify.app/login/oauth2/code/kakao")
@Value("https://66c82eac6cbdbb00089ce5c5--showhoo.netlify.app/login/oauth2/code/kakao")
private String redirectUri;

@Value("https://66c81c7bad01400008a289e2--showhoo.netlify.app")
@Value("https://66c82eac6cbdbb00089ce5c5--showhoo.netlify.app")
private String logout_redirectUri;

@Value("${kakao.client.id}")
Expand Down
1 change: 1 addition & 0 deletions src/main/java/umc/ShowHoo/web/shows/entity/Shows.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ public class Shows {
@OneToOne
@JoinColumn(name = "space_apply_id")
private SpaceApply spaceApply;

}

0 comments on commit c5f469a

Please sign in to comment.