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

[deploy] merge to main #132

Merged
merged 60 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
87ec61c
[deploy] merge to develop (#27)
hoonyworld Jul 11, 2024
2f62a58
[feat] #28 - 비회원 예매 조회 POST API 구현 (#29)
hoonyworld Jul 11, 2024
b802e51
[feat] #30 - SwaggerConfig 및 WebConfig 구현 (#31)
hoonyworld Jul 11, 2024
b50cec3
HOTFIX(workflows): push 이벤트 시 github action이 빌드 되지 않도록 수정
hoonyworld Jul 11, 2024
84e7f8b
Merge branch 'develop' of https://github.com/TEAM-BEAT/BEAT-SERVER in…
hoonyworld Jul 11, 2024
6e279c8
HOTFIX(Jenkinsfile): 포트 수정
hoonyworld Jul 11, 2024
3c3cb9f
[feat] #32 - 티켓 예매 가능 여부 GET API 구현 (#33)
hoonyworld Jul 11, 2024
f4d1c20
[feat] #17 - 카카오 소셜 로그인 API 구현 (#36)
hyerinhwang-sailin Jul 13, 2024
467dab0
[feat] #34 - 비회원 예매 POST API 구현 (#35)
hoonyworld Jul 14, 2024
f55e023
[Refactor] #37 - 카카오 로그인 API response 수정 (#39)
hyerinhwang-sailin Jul 14, 2024
550a64d
[feat] #40 - 소개 관련 공연 정보 조회 GET API 구현 (#41)
hyerinhwang-sailin Jul 14, 2024
295172c
[feat] #42 - 예매 관련 공연 정보 GET API 구현 (#43)
hyerinhwang-sailin Jul 14, 2024
86e4f6d
[feat] #38 - 회원 예매 POST API 구현 (#45)
hoonyworld Jul 14, 2024
911c751
[feat] #44 - 홈페이지 공연 및 홍보 조회 GET API 구현 (#47)
hyerinhwang-sailin Jul 14, 2024
6f28c55
[feat] #46 - 회원 예매 조회 GET API 구현 (#48)
hoonyworld Jul 14, 2024
b90138d
[feat] #49 - 예매자 관리 API 구현 (#51)
hyerinhwang-sailin Jul 15, 2024
f37c9e3
HOTFIX(SecurityConfig): WHITELIST 경로명 수정
hoonyworld Jul 15, 2024
3ab2765
[fix] #52 - auth whitelist 수정 (#53)
hyerinhwang-sailin Jul 15, 2024
ef2d34f
[feat] #54 - 등록한 공연 목록 조회 GET API 구현 (#55)
hyerinhwang-sailin Jul 15, 2024
33e9d39
[fix] #58 - dev-ci.yml, prod-ci.yml 환경변수 추가 (#59)
hoonyworld Jul 15, 2024
3a49335
[refactor] #61 - Performance Entity field 추가 (#62)
hyerinhwang-sailin Jul 15, 2024
9728233
[feat] #63 - healthCheckController 생성 (#64)
hoonyworld Jul 16, 2024
e7b4646
Merge branch 'main' into develop
hoonyworld Jul 16, 2024
8312edb
[feat] #63 - health check URL 화이트리스트에 등록 (#67)
hoonyworld Jul 16, 2024
f199715
[fix] #57 - entity 연관관계 설정 SecurityConfig 수정 (#65)
hyerinhwang-sailin Jul 16, 2024
e37a2ea
Merge branch 'main' into develop
hoonyworld Jul 16, 2024
3a92f78
[fix] #57 - security 관련 에러 대응 (#71)
hyerinhwang-sailin Jul 16, 2024
02becc3
Merge branch 'main' into develop
hoonyworld Jul 16, 2024
4a414f7
[fix] #73 - security 수정 (#74)
hyerinhwang-sailin Jul 16, 2024
d079aec
Merge branch 'main' into develop
hoonyworld Jul 16, 2024
585cea3
[#76] fix(SecurityConfig): Base64 인코딩을 하도록 변경 (#77)
hoonyworld Jul 16, 2024
4c20f1c
Merge branch 'main' into develop
hoonyworld Jul 16, 2024
1b51be8
[fix] #76 - 누락된 코드 추가 (#79)
hoonyworld Jul 16, 2024
6da3238
[#81] fix(JwtTokenProvider): jwtsecret을 인코딩하고 디코딩을 하도록 수정 (#82)
hoonyworld Jul 16, 2024
d692f76
Merge branch 'main' into develop
hoonyworld Jul 16, 2024
e93fc8f
[#85] chore(application.yml): 환경변수 설정 (#86)
hoonyworld Jul 16, 2024
e23659f
[chore] #88 - 레디스 환경변수 추가 (#89)
hoonyworld Jul 16, 2024
f519b0c
[deploy] merge to main (#90)
hoonyworld Jul 16, 2024
ade47e5
Revert "[deploy] merge to main (#90)" (#91)
hoonyworld Jul 16, 2024
53ec218
[fix] #93 - 누락된 어노테이션 및 누락된 경로명 추가 (#94)
hoonyworld Jul 16, 2024
56a98f3
[bug] #84 - actuator/health 의존성 및 설정 추가 (#96)
hyerinhwang-sailin Jul 17, 2024
b43b8d6
Merge branch 'main' into develop
hyerinhwang-sailin Jul 17, 2024
965a53b
[#84] chore: yml 수정 (#99)
hyerinhwang-sailin Jul 17, 2024
350199a
[bug] #101 - yml, s3 수정 (#102)
hyerinhwang-sailin Jul 17, 2024
4a1c7b2
HOTIFX: prod ci-yml 수정
hoonyworld Jul 17, 2024
1eab73f
Merge branch 'main' into develop
hoonyworld Jul 17, 2024
66585cb
Main redis host yml 수정 (#105)
hyerinhwang-sailin Jul 17, 2024
af6a923
[feat] #50 - 공연 생성 POST API 생성 (#108)
hoonyworld Jul 17, 2024
586f2a8
[feat] #111 - 웹발신 구현 (#114)
hyerinhwang-sailin Jul 17, 2024
3e74002
[feat] #110 - 공연 수정 PUT API 구현 (#112)
hoonyworld Jul 17, 2024
28df0ba
[feat] #113 - 공연 삭제 DELETE API 구현 (#116)
hoonyworld Jul 17, 2024
46df45c
Update README.md
hyerinhwang-sailin Jul 17, 2024
94427b1
HOTFIX: 코드 수정
hoonyworld Jul 17, 2024
88ff454
Merge branch 'main' into develop
hoonyworld Jul 17, 2024
5ad88f9
[#119] refactor: response에 필요 필드 추가 (#120)
hyerinhwang-sailin Jul 17, 2024
ff1618c
[feat] #117 - 공연 수정 페이지 정보 조회 GET API 구현 (#121)
hoonyworld Jul 17, 2024
5cfd1e9
Merge branch 'main' into develop
hoonyworld Jul 17, 2024
b1eb1fa
[#123] fix(PerformanceController): 중복 코드 제거 (#124)
hoonyworld Jul 17, 2024
c091ecf
[#128] fix: 누락된 환경 변수 주입 및 수정 (#129)
hyerinhwang-sailin Jul 17, 2024
8cadaa0
[feat] #127 - presigned-url로 포스터 이미지, 등장인물 이미지 리스트, 스태프 이미지 리스트를 반환하도…
hoonyworld Jul 17, 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
3 changes: 3 additions & 0 deletions .github/workflows/dev-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
DEV_REDIS_HOST: ${{ secrets.DEV_REDIS_HOST }}
DEV_S3_ACCESS_KEY: ${{ secrets.DEV_S3_ACCESS_KEY }}
DEV_S3_SECRET_KEY: ${{ secrets.DEV_S3_SECRET_KEY }}
DEV_COOLSMS_KEY: ${{ secrets.DEV_COOLSMS_KEY }}
DEV_COOLSMS_NUMBER: ${{ secrets.DEV_COOLSMS_NUMBER }}
DEV_COOLSMS_SECRET: ${{ secrets.DEV_COOLSMS_SECRET }}
run: |
cd ./src/main/resources
envsubst < application-dev.yml > application-dev.tmp.yml && mv application-dev.tmp.yml application-dev.yml
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/prod-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
PROD_REDIS_HOST: ${{ secrets.PROD_REDIS_HOST }}
PROD_S3_ACCESS_KEY: ${{ secrets.PROD_S3_ACCESS_KEY }}
PROD_S3_SECRET_KEY: ${{ secrets.PROD_S3_SECRET_KEY }}
PROD_COOLSMS_KEY: ${{ secrets.PROD_COOLSMS_KEY }}
PROD_COOLSMS_NUMBER: ${{ secrets.PROD_COOLSMS_NUMBER }}
PROD_COOLSMS_SECRET: ${{ secrets.PROD_COOLSMS_SECRET }}
run: |
cd ./src/main/resources
envsubst < application-prod.yml > application-prod.tmp.yml && mv application-prod.tmp.yml application-prod.yml
Expand Down
2 changes: 2 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 @@ -7,4 +7,6 @@

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

List<Cast> findAllByPerformanceId(Long performanceId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
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;
Expand Down Expand Up @@ -34,8 +35,7 @@ public class PerformanceController {
private final PerformanceService performanceService;
private final PerformanceManagementService performanceManagementService;
private final PerformanceUpdateService performanceUpdateService;



@Operation(summary = "공연 생성 API", description = "공연을 생성하는 POST API입니다.")
@PostMapping
public ResponseEntity<SuccessResponse<PerformanceResponse>> createPerformance(
Expand All @@ -45,6 +45,7 @@ public ResponseEntity<SuccessResponse<PerformanceResponse>> createPerformance(
return ResponseEntity.status(HttpStatus.CREATED)
.body(SuccessResponse.of(PerformanceSuccessCode.PERFORMANCE_CREATE_SUCCESS, response));
}

@Operation(summary = "공연 정보 수정 API", description = "공연 정보를 수정하는 PUT API입니다.")
@PutMapping
public ResponseEntity<SuccessResponse<PerformanceUpdateResponse>> updatePerformance(
Expand All @@ -55,6 +56,15 @@ public ResponseEntity<SuccessResponse<PerformanceUpdateResponse>> updatePerforma
.body(SuccessResponse.of(PerformanceSuccessCode.PERFORMANCE_UPDATE_SUCCESS, response));
}

@Operation(summary = "공연 수정 페이지 정보 조회 API", description = "공연 정보를 조회하는 GET API입니다.")
@GetMapping("/{performanceId}")
public ResponseEntity<SuccessResponse<PerformanceEditResponse>> getPerformanceForEdit(
@CurrentMember Long memberId,
@PathVariable Long performanceId) {
PerformanceEditResponse response = performanceService.getPerformanceEdit(memberId, performanceId);
return ResponseEntity.ok(SuccessResponse.of(PerformanceSuccessCode.PERFORMANCE_MODIFY_PAGE_SUCCESS, response));
}

@Operation(summary = "공연 상세정보 조회 API", description = "공연 상세페이지의 공연 상세정보를 조회하는 GET API입니다.")
@GetMapping("/detail/{performanceId}")
public ResponseEntity<SuccessResponse<PerformanceDetailResponse>> getPerformanceDetail(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
package com.beat.domain.performance.application;
import com.beat.domain.booking.dao.BookingRepository;
import com.beat.domain.cast.domain.Cast;
import com.beat.domain.member.dao.MemberRepository;
import com.beat.domain.member.domain.Member;
import com.beat.domain.member.exception.MemberErrorCode;
import com.beat.domain.performance.application.dto.*;
import com.beat.domain.performance.application.dto.create.CastResponse;
import com.beat.domain.performance.application.dto.create.ScheduleResponse;
import com.beat.domain.performance.application.dto.create.StaffResponse;
import com.beat.domain.performance.application.dto.home.HomePerformanceDetail;
import com.beat.domain.performance.application.dto.home.HomePromotionDetail;
import com.beat.domain.performance.application.dto.home.HomeRequest;
Expand All @@ -17,6 +22,7 @@
import com.beat.domain.cast.dao.CastRepository;
import com.beat.domain.schedule.domain.Schedule;
import com.beat.domain.staff.dao.StaffRepository;
import com.beat.domain.staff.domain.Staff;
import com.beat.domain.user.dao.UserRepository;
import com.beat.domain.user.domain.Users;
import com.beat.domain.user.exception.UserErrorCode;
Expand All @@ -25,6 +31,9 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
Expand All @@ -39,6 +48,7 @@ public class PerformanceService {
private final PromotionRepository promotionRepository;
private final MemberRepository memberRepository;
private final UserRepository userRepository;
private final BookingRepository bookingRepository;

@Transactional(readOnly = true)
public PerformanceDetailResponse getPerformanceDetail(Long performanceId) {
Expand Down Expand Up @@ -113,7 +123,10 @@ public BookingPerformanceDetailResponse getBookingPerformanceDetail(Long perform
performance.getGenre().name(),
performance.getPosterImage(),
performance.getPerformanceVenue(),
performance.getPerformanceTeamName()
performance.getPerformanceTeamName(),
performance.getBankName() != null ? performance.getBankName().name() : null,
performance.getAccountNumber(),
performance.getAccountHolder()
);
}

Expand Down Expand Up @@ -203,4 +216,78 @@ public MakerPerformanceResponse getMemberPerformances(Long memberId) {
return MakerPerformanceResponse.of(user.getId(), performanceDetails);
}

@Transactional
public PerformanceEditResponse getPerformanceEdit(Long memberId, Long performanceId) {
Member member = memberRepository.findById(memberId)
.orElseThrow(() -> new NotFoundException(MemberErrorCode.MEMBER_NOT_FOUND));

Performance performance = performanceRepository.findById(performanceId)
.orElseThrow(() -> new NotFoundException(PerformanceErrorCode.PERFORMANCE_NOT_FOUND));

boolean isBookerExist = bookingRepository.existsBySchedulePerformanceId(performanceId);

List<Schedule> schedules = scheduleRepository.findAllByPerformanceId(performanceId);
List<Cast> casts = castRepository.findAllByPerformanceId(performanceId);
List<Staff> staffs = staffRepository.findAllByPerformanceId(performanceId);

return mapToPerformanceEditResponse(performance, schedules, casts, staffs, isBookerExist);
}

private PerformanceEditResponse mapToPerformanceEditResponse(Performance performance, List<Schedule> schedules, List<Cast> casts, List<Staff> staffs, boolean isBookerExist) {
List<ScheduleResponse> scheduleResponses = schedules.stream()
.map(schedule -> ScheduleResponse.of(
schedule.getId(),
schedule.getPerformanceDate(),
schedule.getTotalTicketCount(),
calculateDueDate(schedule.getPerformanceDate()),
schedule.getScheduleNumber()
))
.collect(Collectors.toList());

List<CastResponse> castResponses = casts.stream()
.map(cast -> CastResponse.of(
cast.getId(),
cast.getCastName(),
cast.getCastRole(),
cast.getCastPhoto()
))
.collect(Collectors.toList());

List<StaffResponse> staffResponses = staffs.stream()
.map(staff -> StaffResponse.of(
staff.getId(),
staff.getStaffName(),
staff.getStaffRole(),
staff.getStaffPhoto()
))
.collect(Collectors.toList());

return PerformanceEditResponse.of(
performance.getUsers().getId(),
performance.getId(),
performance.getPerformanceTitle(),
performance.getGenre(),
performance.getRunningTime(),
performance.getPerformanceDescription(),
performance.getPerformanceAttentionNote(),
performance.getBankName(),
performance.getAccountNumber(),
performance.getAccountHolder(),
performance.getPosterImage(),
performance.getPerformanceTeamName(),
performance.getPerformanceVenue(),
performance.getPerformanceContact(),
performance.getPerformancePeriod(),
performance.getTicketPrice(),
performance.getTotalScheduleCount(),
isBookerExist,
scheduleResponses,
castResponses,
staffResponses
);
}

private int calculateDueDate(LocalDateTime performanceDate) {
return (int) ChronoUnit.DAYS.between(LocalDate.now(), performanceDate.toLocalDate());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ public record BookingPerformanceDetailResponse(
String genre,
String posterImage,
String performanceVenue,
String performanceTeamName
String performanceTeamName,
String bankName,
String accountNumber,
String accountHolder
) {
public static BookingPerformanceDetailResponse of(
Long performanceId,
Expand All @@ -22,9 +25,12 @@ public static BookingPerformanceDetailResponse of(
String genre,
String posterImage,
String performanceVenue,
String performanceTeamName
String performanceTeamName,
String bankName,
String accountNumber,
String accountHolder
) {
return new BookingPerformanceDetailResponse(performanceId, performanceTitle, performancePeriod, scheduleList, ticketPrice, genre, posterImage, performanceVenue, performanceTeamName);
return new BookingPerformanceDetailResponse(performanceId, performanceTitle, performancePeriod, scheduleList, ticketPrice, genre, posterImage, performanceVenue, performanceTeamName, bankName, accountNumber, accountHolder);
}

}
Loading
Loading