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

[release] v1.1.0 릴리즈 #240

Merged
merged 112 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 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
915e628
[refactor] #133 - presigned URL의 만료 시간 늘리기 (#134)
hoonyworld Jul 17, 2024
ac08b45
[#135] refactor(SwaggerConfig): SwaggerConfig 리팩토링 (#136)
hoonyworld Jul 17, 2024
0d8f1ef
[#128] fix(BankName): bankname enum 추가 (#139)
hyerinhwang-sailin Jul 18, 2024
e1823d7
[refactor] #126 - 프론트 요청 필드 반영 (#140)
hoonyworld Jul 18, 2024
855495e
[#142] refactor(FileController): castImages, staffImages의 파라미터 value를…
hoonyworld Jul 18, 2024
db0ebb4
Merge branch 'main' into develop
hoonyworld Jul 18, 2024
c0d2401
Update README.md
hyerinhwang-sailin Jul 19, 2024
efc2293
[#147] refactor: 예금주 필드 추가 (#148)
hoonyworld Jul 19, 2024
7e6fcd7
[feat] #150 - 스프링 서버를 redis와 동일한 네트워크에서 실행되도록 구현 (#151)
hoonyworld Jul 19, 2024
1424b37
[#150] deploy(application-prod.yml): 운영서버 ddl-auto create로 초기화 (#155)
hoonyworld Jul 19, 2024
192d346
[#159] docs(README.md): 서비스 소개 내용 업데이트 (#160)
hoonyworld Jul 23, 2024
d74c416
docs(README.md): README 수정
hoonyworld Jul 23, 2024
4d84412
docs(README.md): 기획 의견 반영
hoonyworld Jul 23, 2024
405880a
[fix] #162 - 공연 삭제 로직 변경 (#163)
hoonyworld Aug 6, 2024
1c57c10
[fix] #164 - 입금여부수정 api 경로 수정 및 dev db 초기화 (#165)
hyerinhwang-sailin Aug 7, 2024
234e2f1
[feat] #166 - 사용하지 않는 도커이미지를 서버에서 삭제하도록 Jenkinsfile에 스크립트 추가 (#167)
hoonyworld Aug 9, 2024
b2f8530
[#168] comment: 불필요한 주석 제거 (#169)
hyerinhwang-sailin Aug 9, 2024
dae27a6
[fix] #170 - 예매자 삭제 시 판매 티켓 수에 반영하는 로직 구현 (#171)
hyerinhwang-sailin Aug 13, 2024
fe0bb64
[feat] #172 - promotion 필드 추가 및 지난 공연 캐러샐 자동 삭제 구현, response에 dueDate…
hyerinhwang-sailin Aug 16, 2024
ce21e62
[feat] #172 - 캐러셀 response에 필드 추가 (#176)
hyerinhwang-sailin Aug 16, 2024
2848507
[#178] feat(TokenService): deleteRefreshToken에 logging 추가 (#179)
hyerinhwang-sailin Aug 20, 2024
831f714
[#180] refactor - isBooking 로직 조건 개선 (#181)
hyerinhwang-sailin Aug 20, 2024
4b2045c
[refactor] #177 - 공연 수정 API에서 회차, 등장인물, 스태프를 추가, 삭제, 업데이트가 가능하도록 리팩토링…
hoonyworld Aug 22, 2024
c2966e2
[feat] #183 - 공연 등록 시 공연상세이미지 추가 및 상세페이지, 수정페이지에서의 조회 기능 구현과 웹발신 문자내용…
hyerinhwang-sailin Aug 23, 2024
7e37618
[refactor] #185 - schedule, staff, cast의 add, delete, update DTO를 하나의…
hoonyworld Aug 23, 2024
ea79e35
[feat] #188 - 공연 상세이미지 수정 구현 및 패키지구조 정리, dto 이름 변경 (#189)
hyerinhwang-sailin Aug 24, 2024
0bb1410
[refactor] #192 - 공연소개 & 유의사항 최대 글자수 500자로 구현 (#193)
hoonyworld Aug 29, 2024
d9ed66d
[feat] #191 - 예매 취소 및 취소된 티켓 1년 후 자동삭제 구현, 입금 완료된 예매자 미입금으로 바꾸지 못하도록 …
hyerinhwang-sailin Aug 29, 2024
e327ad4
[#196] fix(PerformanceService): getPromotions 로직 performanceId null인 …
hyerinhwang-sailin Aug 29, 2024
c8c12ec
[feat] #200 - 공연회차 등록 10회까지 가능하도록 수정 (#201)
hyerinhwang-sailin Aug 31, 2024
e3a1283
feat #202 - allowedMethods에 PATCH 메서드 추가 및 allowedOriginPatterns에 도메인…
hoonyworld Aug 31, 2024
e2b48bb
[fix] #204 - SuccessReponse 메서드 타입 수정 및 회원 예매 조회 타입 일치 완료 (#205)
hoonyworld Sep 2, 2024
1fdf72e
[#206] fix(TokenErrorCode): 토큰 만료 메시지 status 401로 변경 (#207)
hoonyworld Sep 2, 2024
f7de0d7
[feat] #190 - admin 기능 구현 (#208)
hoonyworld Sep 10, 2024
2ed81c3
[feat] #209 - Admin 캐러셀 조회, 수정 API 구현 (#210)
hoonyworld Sep 25, 2024
e767b88
[fix] #198 - isBooking update 안되는 이슈 해결 (#199)
hyerinhwang-sailin Sep 26, 2024
7074729
[#212] fix(CurrentMember): 파라미터 옵션 hidden으로 설정 (#213)
hoonyworld Sep 26, 2024
099dfcb
[#211] fix(BookingRepository): 예매자 존재 여부 확인 로직 변경 (#216)
hyerinhwang-sailin Sep 30, 2024
ee45a3e
[fix] #211 - 스케쥴 날짜 및 티켓수 변경 관련 에러 처리 (#214)
hyerinhwang-sailin Sep 30, 2024
9667c19
[fix] #217 - CORS 허용 도메인 환경변수 처리 완료 (#218)
hoonyworld Sep 30, 2024
2846432
[fix] #219 - 캐러셀 번호가 중복된 항목 중에서 promotionId가 다른 경우에만 삭제하도록 수정 (#220)
hoonyworld Sep 30, 2024
2dbb3a4
[refactor] #221 - 메인페이지에서 캐러셀 응답 시 캐러셀 번호로 정렬해서 주도록 변경 및 메인 페이지 조회 코드…
hoonyworld Oct 2, 2024
2dc6b65
[#223] HOTFIX: 캐러셀 삭제 시 promotionId로 판단하도록 수정 (#224)
hoonyworld Oct 3, 2024
5775296
[#225] HOTFIX: ROLE 접두사 2번 붙는 오류 해결 (#226)
hoonyworld Oct 5, 2024
f2cef30
[HOTFIX] #227 - 권한 체크를 위한 로그 추가 (#228)
hoonyworld Oct 5, 2024
f76896a
HOTFIX #229 - 회원 등록 후 flush()를 호출하여 DB에 반영 (#230)
hoonyworld Oct 5, 2024
83c21fa
[#231] HOTFIX: role 관련 상세로그 추가 (#232)
hoonyworld Oct 6, 2024
6b28378
[HOTFIX] #233 - memberId로 User객체를 잘못 조회했던 문제 해결 (#234)
hoonyworld Oct 6, 2024
1485949
[#235] fix(Token): 초 단위에 맞게 TTL 변경 (#236)
hoonyworld Oct 7, 2024
a6f57e8
[chore] #237 - Swagger Versioning 업데이트, 서버 url 명시, 사용하지 않는 파일 삭제 (#238)
hoonyworld Oct 7, 2024
92dd5d2
delete: FileController 제거
hoonyworld Oct 7, 2024
2a3a828
chore: 일시적으로 주석처리
hoonyworld Oct 7, 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
20 changes: 12 additions & 8 deletions .github/workflows/dev-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
DEV_COOLSMS_KEY: ${{ secrets.DEV_COOLSMS_KEY }}
DEV_COOLSMS_NUMBER: ${{ secrets.DEV_COOLSMS_NUMBER }}
DEV_COOLSMS_SECRET: ${{ secrets.DEV_COOLSMS_SECRET }}
DEV_ACCESS_TOKEN_EXPIRE_TIME: ${{ secrets.DEV_ACCESS_TOKEN_EXPIRE_TIME }}
DEV_REFRESH_TOKEN_EXPIRE_TIME: ${{ secrets.DEV_REFRESH_TOKEN_EXPIRE_TIME }}
DEV_ALLOWED_ORIGINS: ${{ secrets.DEV_ALLOWED_ORIGINS }}
DEV_SERVER_URL: ${{ secrets.DEV_SERVER_URL }}
run: |
cd ./src/main/resources
envsubst < application-dev.yml > application-dev.tmp.yml && mv application-dev.tmp.yml application-dev.yml
Expand Down Expand Up @@ -81,11 +85,11 @@ jobs:
docker build -f Dockerfile-dev --platform linux/amd64 -t hoonyworld/beat-dev .
docker push hoonyworld/beat-dev

# Trigger Jenkins job - Jenkins 작업 트리거
- name: Trigger Jenkins job
uses: appleboy/jenkins-action@master
with:
url: ${{ secrets.DEV_WEBHOOK_URL }}
user: "beat"
token: ${{ secrets.DEV_JENKINS_API_TOKEN }}
job: "beat-project"
# # Trigger Jenkins job - Jenkins 작업 트리거
# - name: Trigger Jenkins job
# uses: appleboy/jenkins-action@master
# with:
# url: ${{ secrets.DEV_WEBHOOK_URL }}
# user: "beat"
# token: ${{ secrets.DEV_JENKINS_API_TOKEN }}
# job: "beat-project"
20 changes: 12 additions & 8 deletions .github/workflows/prod-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
PROD_COOLSMS_KEY: ${{ secrets.PROD_COOLSMS_KEY }}
PROD_COOLSMS_NUMBER: ${{ secrets.PROD_COOLSMS_NUMBER }}
PROD_COOLSMS_SECRET: ${{ secrets.PROD_COOLSMS_SECRET }}
PROD_ACCESS_TOKEN_EXPIRE_TIME: ${{ secrets.PROD_ACCESS_TOKEN_EXPIRE_TIME }}
PROD_REFRESH_TOKEN_EXPIRE_TIME: ${{ secrets.PROD_REFRESH_TOKEN_EXPIRE_TIME }}
PROD_ALLOWED_ORIGINS: ${{ secrets.PROD_ALLOWED_ORIGINS }}
PROD_SERVER_URL: ${{ secrets.PROD_SERVER_URL }}
run: |
cd ./src/main/resources
envsubst < application-prod.yml > application-prod.tmp.yml && mv application-prod.tmp.yml application-prod.yml
Expand Down Expand Up @@ -81,11 +85,11 @@ jobs:
docker build --platform linux/amd64 -t donghoon0203/beat-prod .
docker push donghoon0203/beat-prod

# Trigger Jenkins job - Jenkins 작업 트리거
- name: Trigger Jenkins job
uses: appleboy/jenkins-action@master
with:
url: ${{ secrets.PROD_WEBHOOK_URL }}
user: "beat"
token: ${{ secrets.PROD_JENKINS_API_TOKEN }}
job: "beat-project"
# # Trigger Jenkins job - Jenkins 작업 트리거
# - name: Trigger Jenkins job
# uses: appleboy/jenkins-action@master
# with:
# url: ${{ secrets.PROD_WEBHOOK_URL }}
# user: "beat"
# token: ${{ secrets.PROD_JENKINS_API_TOKEN }}
# job: "beat-project"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,6 @@ Temporary Items

# End of https://www.toptal.com/developers/gitignore/api/intellij,java,macos.gradle/
.idea/

# Ignore application-local.yml
src/main/resources/application-local.yml
30 changes: 0 additions & 30 deletions HELP.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ BEAT와 함께 효율적이고 체계적으로 공연을 관리해 볼까요?
<img src="https://github.com/user-attachments/assets/35b618b6-932e-4ef8-99bc-857f4e45d610">

## 👥 Contributors
- [BEAT Client Repository](https://github.com/TEAM-BEAT/BEAT-Client)
- [BEAT Client Repository](https://github.com/TEAM-BEAT/BEAT-Client)
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repositories {
dependencies {
// Spring
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
// developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// Database
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/beat/BeatApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableFeignClients
@EnableScheduling
@EnableAsync
@ImportAutoConfiguration({FeignAutoConfiguration.class})
public class BeatApplication {

Expand Down
134 changes: 134 additions & 0 deletions src/main/java/com/beat/admin/adapter/in/api/AdminApi.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
package com.beat.admin.adapter.in.api;

import com.beat.admin.application.dto.response.CarouselFindAllResponse;
import com.beat.admin.application.dto.response.UserFindAllResponse;
import com.beat.admin.application.dto.request.CarouselHandleRequest;
import com.beat.admin.application.dto.response.CarouselHandleAllResponse;
import com.beat.global.auth.annotation.CurrentMember;
import com.beat.global.common.dto.ErrorResponse;
import com.beat.global.common.dto.SuccessResponse;
import com.beat.global.external.s3.application.dto.BannerPresignedUrlFindResponse;
import com.beat.global.external.s3.application.dto.CarouselPresignedUrlFindAllResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Tag(name = "Admin", description = "관리자 제어 API")
public interface AdminApi {

@Operation(summary = "유저 정보 조회", description = "관리자가 유저들의 정보를 조회하는 GET API")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "관리자 권한으로 모든 유저 조회에 성공하였습니다.",
content = @Content(schema = @Schema(implementation = SuccessResponse.class))
),
@ApiResponse(
responseCode = "404",
description = "회원이 없습니다",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
ResponseEntity<SuccessResponse<UserFindAllResponse>> readAllUsers(
@CurrentMember Long memberId
);

@Operation(summary = "캐러셀에 업로드 할 이미지에 대한 presigned URL 발급", description = "관리자가 캐러셀에 업로드 할 이미지에 대한 presigned URL을 발급 받는 GET API")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "캐러셀 Presigned URL 발급 성공",
content = @Content(schema = @Schema(implementation = SuccessResponse.class))
),
@ApiResponse(
responseCode = "404",
description = "회원이 없습니다.",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
ResponseEntity<SuccessResponse<CarouselPresignedUrlFindAllResponse>> createAllCarouselPresignedUrls(
@CurrentMember Long memberId,
@RequestParam List<String> carouselImages
);

@Operation(summary = "배너에 업로드 할 이미지에 대한 presigned URL 발급", description = "관리자가 배너에 업로드 할 이미지에 대한 presigned URL을 발급 받는 GET API")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "배너 Presigned URL 발급 성공",
content = @Content(schema = @Schema(implementation = SuccessResponse.class))
),
@ApiResponse(
responseCode = "404",
description = "회원이 없습니다.",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
ResponseEntity<SuccessResponse<BannerPresignedUrlFindResponse>> createBannerPresignedUrl(
@CurrentMember Long memberId,
@RequestParam String bannerImage
);

@Operation(summary = "캐러셀에 등록된 모든 공연 정보 조회", description = "관리자가 현재 캐러셀에 등록된 모든 공연 정보를 조회하는 GET API")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "관리자 권한으로 현재 캐러셀에 등록된 모든 공연 조회에 성공하였습니다.",
content = @Content(schema = @Schema(implementation = SuccessResponse.class))
),
@ApiResponse(
responseCode = "404",
description = "회원이 없습니다.",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
ResponseEntity<SuccessResponse<CarouselFindAllResponse>> readAllCarouselImages(
@CurrentMember Long memberId
);

@Operation(summary = "캐러셀 이미지 수정", description = "관리자가 캐러셀 이미지를 수정하는 PUT API")
@ApiResponses(
value = {
@ApiResponse(
responseCode = "200",
description = "캐러셀 이미지 수정 성공",
content = @Content(schema = @Schema(implementation = SuccessResponse.class))
),
@ApiResponse(
responseCode = "404",
description = "회원이 없습니다.",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
),
@ApiResponse(
responseCode = "404",
description = "해당 홍보 정보를 찾을 수 없습니다.",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
),
@ApiResponse(
responseCode = "404",
description = "해당 공연 정보를 찾을 수 없습니다.",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
)
}
)
ResponseEntity<SuccessResponse<CarouselHandleAllResponse>> processCarouselImages(
@CurrentMember Long memberId,
@RequestBody CarouselHandleRequest request
);
}
79 changes: 79 additions & 0 deletions src/main/java/com/beat/admin/adapter/in/api/AdminController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package com.beat.admin.adapter.in.api;

import com.beat.admin.application.dto.response.CarouselFindAllResponse;
import com.beat.admin.application.dto.request.CarouselHandleRequest;
import com.beat.admin.application.dto.response.CarouselHandleAllResponse;
import com.beat.admin.exception.AdminSuccessCode;
import com.beat.admin.application.dto.response.UserFindAllResponse;
import com.beat.admin.facade.AdminFacade;
import com.beat.global.auth.annotation.CurrentMember;
import com.beat.global.common.dto.SuccessResponse;
import com.beat.global.external.s3.application.dto.BannerPresignedUrlFindResponse;
import com.beat.global.external.s3.application.dto.CarouselPresignedUrlFindAllResponse;

import lombok.RequiredArgsConstructor;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/admin")
@RequiredArgsConstructor
public class AdminController implements AdminApi {

private final AdminFacade adminFacade;

@Override
@GetMapping("/users")
public ResponseEntity<SuccessResponse<UserFindAllResponse>> readAllUsers(@CurrentMember Long memberId) {
UserFindAllResponse response = adminFacade.checkMemberAndFindAllUsers(memberId);
return ResponseEntity.status(HttpStatus.OK)
.body(SuccessResponse.of(AdminSuccessCode.FETCH_ALL_USERS_SUCCESS, response));
}

@Override
@GetMapping("/carousels/presigned-url")
public ResponseEntity<SuccessResponse<CarouselPresignedUrlFindAllResponse>> createAllCarouselPresignedUrls(
@CurrentMember Long memberId, @RequestParam List<String> carouselImages) {
CarouselPresignedUrlFindAllResponse response = adminFacade.checkMemberAndIssueAllPresignedUrlsForCarousel(
memberId, carouselImages);
return ResponseEntity.ok(SuccessResponse.of(AdminSuccessCode.CAROUSEL_PRESIGNED_URL_ISSUED, response));
}

@Override
@GetMapping("/banner/presigned-url")
public ResponseEntity<SuccessResponse<BannerPresignedUrlFindResponse>> createBannerPresignedUrl(
@CurrentMember Long memberId, @RequestParam String bannerImage) {
BannerPresignedUrlFindResponse response = adminFacade.checkMemberAndIssuePresignedUrlForBanner(memberId,
bannerImage);
return ResponseEntity.status(HttpStatus.OK)
.body(SuccessResponse.of(AdminSuccessCode.BANNER_PRESIGNED_URL_ISSUED, response));
}

@Override
@GetMapping("/carousels")
public ResponseEntity<SuccessResponse<CarouselFindAllResponse>> readAllCarouselImages(
@CurrentMember Long memberId) {
CarouselFindAllResponse response = adminFacade.checkMemberAndFindAllPromotionsSortedByCarouselNumber(memberId);
return ResponseEntity.status(HttpStatus.OK)
.body(SuccessResponse.of(AdminSuccessCode.FETCH_ALL_CAROUSEL_PROMOTIONS_SUCCESS, response));
}

@Override
@PutMapping("/carousels")
public ResponseEntity<SuccessResponse<CarouselHandleAllResponse>> processCarouselImages(
@CurrentMember Long memberId,
@RequestBody CarouselHandleRequest request) {
CarouselHandleAllResponse response = adminFacade.checkMemberAndProcessAllPromotionsSortedByCarouselNumber(memberId, request);
return ResponseEntity.status(HttpStatus.OK)
.body(SuccessResponse.of(AdminSuccessCode.UPDATE_ALL_CAROUSEL_PROMOTIONS_SUCCESS, response));
}
}
Loading
Loading