Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor] #185 - schedule, staff, cast의 add, delete, update DTO를 하나의 DTO로 변경 및 scheduleNumber를 서버측에서 부여하도록 변경 #187

Merged
merged 24 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0a3a45f
[#185] remove: 수정 시 add, delete, update 요청/응답 DTO 삭제
hoonyworld Aug 22, 2024
9313954
[#185] remove: 수정 시 add, delete, update 요청/응답 DTO 삭제 및 PerformanceUpd…
hoonyworld Aug 22, 2024
f391183
[#185] feat(ScheduleModifyRequest): 회차 수정 요청 DTO 생성
hoonyworld Aug 22, 2024
f36cab5
[#185] feat(ScheduleModifyResponse): 회차 수정 응답 DTO 생성
hoonyworld Aug 22, 2024
44b6fe2
[#185] feat(CastModifyRequest): 등장인물 수정 요청 DTO 생성
hoonyworld Aug 22, 2024
6e22790
[#185] feat(CastModifyResponse): 등장인물 수정 응답 DTO 생성
hoonyworld Aug 22, 2024
dd32ec3
[#185] feat(StaffModifyRequest): 스태프 수정 요청 DTO 생성
hoonyworld Aug 22, 2024
91d1057
[#185] feat(StaffModifyResponse): 스태프 수정 응답 DTO 생성
hoonyworld Aug 22, 2024
6ef31fc
[#185] feat(PerformanceModifyRequest): 공연 수정 요청 DTO 생성
hoonyworld Aug 22, 2024
228cc0d
[#185] feat(PerformanceModifyResponse): 공연 수정 응답 DTO 생성
hoonyworld Aug 22, 2024
3a077d6
[#185] refactor(Schedule): scheduleNumber 업데이트 메서드 추가
hoonyworld Aug 22, 2024
389e06b
[#185] refactor(StaffRepository): 해당 공연 id를 외래키로 가지는 회차 id 리스트를 반환하는 …
hoonyworld Aug 22, 2024
41b68d9
[#185] refactor(CastRepository): 해당 공연 id를 외래키로 가지는 등장인물 id 리스트를 반환하는…
hoonyworld Aug 22, 2024
590224f
[#185] refactor(PerformanceController): DTO 변경으로 인한 코드 수정
hoonyworld Aug 22, 2024
f9bf267
[#185] feat(PerformanceModifyService): PerformanceModifyService 생성 및 …
hoonyworld Aug 22, 2024
57a674f
[#185] refactor(PerformanceController): 공연 수정 메서드명 수정
hoonyworld Aug 22, 2024
516db48
[#185] refactor(CastErrorCode): 해당 공연에 속하지 않은 등장인물을 수정하려고 할 때 발생하는 에러…
hoonyworld Aug 22, 2024
ad3953a
[#185] refactor(ScheduleErrorCode): 해당 공연에 속하지 않은 회차를 수정하려고 할 때 발생하는 …
hoonyworld Aug 22, 2024
f1f3aa2
[#185] refactor(StaffErrorCode): 해당 공연에 속하지 않은 스태프를 수정하려고 할 때 발생하는 에러…
hoonyworld Aug 22, 2024
ebc5062
[#185] refactor(PerformanceModifyService): 해당 공연에 속하지 않은 회차, 등장인물, 스태…
hoonyworld Aug 22, 2024
7e03e79
[#185] refactor(PerformanceModifyService): 삭제 작업을 먼저 수행하도록 리팩토링
hoonyworld Aug 22, 2024
1356535
[#185] comment(GuestBookingService): totalPaymentAmout 관련 주석 추가
hoonyworld Aug 22, 2024
a485409
[#185] comment(MemberBookingService): totalPaymentAmout 관련 주석 추가
hoonyworld Aug 22, 2024
a2abe75
[#185] comment(PerformanceModifyService): 주석 삭제
hoonyworld Aug 22, 2024
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
4 changes: 4 additions & 0 deletions src/main/java/com/beat/domain/cast/dao/CastRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

import com.beat.domain.cast.domain.Cast;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CastRepository extends JpaRepository<Cast, Long> {
List<Cast> findByPerformanceId(Long performanceId);

List<Cast> findAllByPerformanceId(Long performanceId);

@Query("SELECT c.id FROM Cast c WHERE c.performance.id = :performanceId")
List<Long> findIdsByPerformanceId(Long performanceId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@Getter
@RequiredArgsConstructor
public enum CastErrorCode implements BaseErrorCode {
CAST_NOT_BELONG_TO_PERFORMANCE(403,"해당 등장인물은 해당 공연에 속해 있지 않습니다."),
CAST_NOT_FOUND(404, "등장인물이 존재하지 않습니다.")
;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.beat.domain.performance.api;

import com.beat.domain.performance.application.PerformanceManagementService;
import com.beat.domain.performance.application.PerformanceUpdateService;
import com.beat.domain.performance.application.PerformanceModifyService;
import com.beat.domain.performance.application.dto.BookingPerformanceDetailResponse;
import com.beat.domain.performance.application.dto.MakerPerformanceResponse;
import com.beat.domain.performance.application.dto.PerformanceDetailResponse;
import com.beat.domain.performance.application.dto.PerformanceEditResponse;
import com.beat.domain.performance.application.dto.create.PerformanceRequest;
import com.beat.domain.performance.application.dto.create.PerformanceResponse;
import com.beat.domain.performance.application.dto.update.PerformanceUpdateRequest;
import com.beat.domain.performance.application.dto.update.PerformanceUpdateResponse;
import com.beat.domain.performance.application.dto.modify.PerformanceModifyRequest;
import com.beat.domain.performance.application.dto.modify.PerformanceModifyResponse;
import com.beat.domain.performance.exception.PerformanceSuccessCode;
import com.beat.domain.performance.application.PerformanceService;
import com.beat.global.auth.annotation.CurrentMember;
Expand All @@ -36,7 +36,7 @@ public class PerformanceController {

private final PerformanceService performanceService;
private final PerformanceManagementService performanceManagementService;
private final PerformanceUpdateService performanceUpdateService;
private final PerformanceModifyService performanceModifyService;

@Operation(summary = "공연 생성 API", description = "공연을 생성하는 POST API입니다.")
@PostMapping
Expand All @@ -63,10 +63,10 @@ public ResponseEntity<SuccessResponse<PerformanceResponse>> createPerformance(
@ApiResponse(responseCode = "500", description = "서버 내부 오류")
})
@PutMapping
public ResponseEntity<SuccessResponse<PerformanceUpdateResponse>> updatePerformance(
public ResponseEntity<SuccessResponse<PerformanceModifyResponse>> updatePerformance(
@CurrentMember Long memberId,
@RequestBody PerformanceUpdateRequest performanceUpdateRequest) {
PerformanceUpdateResponse response = performanceUpdateService.updatePerformance(memberId, performanceUpdateRequest);
@RequestBody PerformanceModifyRequest performanceModifyRequest) {
PerformanceModifyResponse response = performanceModifyService.modifyPerformance(memberId, performanceModifyRequest);
return ResponseEntity.status(HttpStatus.OK)
.body(SuccessResponse.of(PerformanceSuccessCode.PERFORMANCE_UPDATE_SUCCESS, response));
}
Expand Down
Loading
Loading