Repository navigation
✨ [FEAT] 부스 관리 기능 구현 (WBS-067~077, WBS-186~190) #21
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
899633a
feat: 모집 OPEN 상태에서는 종료일만 수정 가능하도록 제한, 자동 상태전환 테스트 추가
cfu344-png 4a10176
feat: 부스 관리 API 구현 (목록·상세·등록·일괄등록·수정·상태변경·삭제)
cfu344-png 1bdf969
Merge branch 'dev' into feature/booth-management
cfu344-png bc12bc5
fix: 스케줄러 테스트가 REQUIRES_NEW 트랜잭션 경계 때문에 항상 실패하던 문제 수정
cfu344-png 8c41fc0
feat: 배정 부스 소개 수정, QR 발급/조회, 부스 검색 API 구현
cfu344-png 61cff6e
fix: 부스 API 인증 규칙 누락으로 미인증 요청 시 500 발생하던 문제 수정
cfu344-png e7661a8
feat: 부스 관리 프론트엔드 구현 (WBS-186~190), QR 발급 멱등화
cfu344-png e5891da
feat: 모집 공고 상세에 부스 목록 공개 및 스펙 팝업 표시
cfu344-png 43c3887
Merge remote-tracking branch 'origin/dev' into feature/booth-management
cfu344-png bd26b91
Merge branch 'dev' into feature/booth-management
cfu344-png 9556d9c
Merge remote-tracking branch 'origin/dev' into feature/booth-management
cfu344-png 8bf7fec
feat: 부스/모집 관리 화면을 실제 행사 선택과 연동
cfu344-png 29d58e3
fix: CodeRabbit 리뷰 지적사항 반영 (검증, 동시성, 보안, 성능)
cfu344-png 3a522f7
fix: 부스 더 보기에도 행사 전환 요청 무효화 가드 적용
cfu344-png File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
147 changes: 147 additions & 0 deletions
147
BE/src/main/java/com/min/edu/booth/controller/BoothController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,147 @@ | ||
| package com.min.edu.booth.controller; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
| import org.springframework.web.bind.annotation.DeleteMapping; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PathVariable; | ||
| import org.springframework.web.bind.annotation.PatchMapping; | ||
| import org.springframework.web.bind.annotation.PostMapping; | ||
| import org.springframework.web.bind.annotation.RequestBody; | ||
| import org.springframework.web.bind.annotation.RequestParam; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| import com.min.edu.auth.dto.AuthenticatedMemberDto; | ||
| import com.min.edu.booth.domain.BoothStatus; | ||
| import com.min.edu.booth.dto.BoothBulkCreateRequestDto; | ||
| import com.min.edu.booth.dto.BoothCreateRequestDto; | ||
| import com.min.edu.booth.dto.BoothIntroUpdateRequestDto; | ||
| import com.min.edu.booth.dto.BoothPageResponse; | ||
| import com.min.edu.booth.dto.BoothPublicPageResponse; | ||
| import com.min.edu.booth.dto.BoothQrResponseDto; | ||
| import com.min.edu.booth.dto.BoothResponseDto; | ||
| import com.min.edu.booth.dto.BoothStatusUpdateRequestDto; | ||
| import com.min.edu.booth.dto.BoothUpdateRequestDto; | ||
| import com.min.edu.booth.service.BoothService; | ||
| import com.min.edu.common.response.ApiResponse; | ||
|
|
||
| import jakarta.validation.Valid; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| @RestController | ||
| @RequiredArgsConstructor | ||
| public class BoothController { | ||
|
|
||
| private final BoothService boothService; | ||
|
|
||
| // 모집 공고 상세 화면 등 비로그인 사용자에게 부스 목록을 공개하기 위한 API | ||
| @GetMapping("/events/{eventId}/booths/public") | ||
| public ApiResponse<BoothPublicPageResponse> listPublic( | ||
| @PathVariable Long eventId, | ||
| @RequestParam(defaultValue = "0") int page, | ||
| @RequestParam(defaultValue = "20") int size) { | ||
| return ApiResponse.success(boothService.listPublic(eventId, page, size)); | ||
| } | ||
|
|
||
| // WBS-067, WBS-077 | ||
| @GetMapping("/events/{eventId}/booths") | ||
| public ApiResponse<BoothPageResponse> list( | ||
| @PathVariable Long eventId, | ||
| @RequestParam(required = false) BoothStatus status, | ||
| @RequestParam(required = false) String floorName, | ||
| @RequestParam(required = false) String zoneName, | ||
| @RequestParam(required = false) String keyword, | ||
| @RequestParam(defaultValue = "0") int page, | ||
| @RequestParam(defaultValue = "20") int size, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success( | ||
| boothService.list(eventId, status, floorName, zoneName, keyword, page, size, member) | ||
| ); | ||
| } | ||
|
|
||
| // WBS-068 | ||
| @GetMapping("/events/{eventId}/booths/{boothId}") | ||
| public ApiResponse<BoothResponseDto> getDetail( | ||
| @PathVariable Long eventId, | ||
| @PathVariable Long boothId, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.getDetail(eventId, boothId, member)); | ||
| } | ||
|
|
||
| // WBS-069 | ||
| @PostMapping("/events/{eventId}/booths") | ||
| public ApiResponse<BoothResponseDto> create( | ||
| @PathVariable Long eventId, | ||
| @Valid @RequestBody BoothCreateRequestDto request, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.create(eventId, request, member)); | ||
| } | ||
|
|
||
| // WBS-070 | ||
| @PostMapping("/events/{eventId}/booths/bulk") | ||
| public ApiResponse<List<BoothResponseDto>> createBulk( | ||
| @PathVariable Long eventId, | ||
| @Valid @RequestBody BoothBulkCreateRequestDto request, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.createBulk(eventId, request, member)); | ||
| } | ||
|
|
||
| // WBS-071 | ||
| @PatchMapping("/events/{eventId}/booths/{boothId}") | ||
| public ApiResponse<BoothResponseDto> update( | ||
| @PathVariable Long eventId, | ||
| @PathVariable Long boothId, | ||
| @Valid @RequestBody BoothUpdateRequestDto request, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.update(eventId, boothId, request, member)); | ||
| } | ||
|
|
||
| // WBS-072 | ||
| @PatchMapping("/events/{eventId}/booths/{boothId}/status") | ||
| public ApiResponse<BoothResponseDto> updateStatus( | ||
| @PathVariable Long eventId, | ||
| @PathVariable Long boothId, | ||
| @Valid @RequestBody BoothStatusUpdateRequestDto request, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.updateStatus(eventId, boothId, request, member)); | ||
| } | ||
|
|
||
| // WBS-073 | ||
| @DeleteMapping("/events/{eventId}/booths/{boothId}") | ||
| public ApiResponse<Void> delete( | ||
| @PathVariable Long eventId, | ||
| @PathVariable Long boothId, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| boothService.delete(eventId, boothId, member); | ||
| return ApiResponse.success(); | ||
| } | ||
|
|
||
| // WBS-074 | ||
| @PatchMapping("/events/{eventId}/booths/{boothId}/intro") | ||
| public ApiResponse<BoothResponseDto> updateIntro( | ||
| @PathVariable Long eventId, | ||
| @PathVariable Long boothId, | ||
| @Valid @RequestBody BoothIntroUpdateRequestDto request, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.updateIntro(eventId, boothId, request, member)); | ||
| } | ||
|
|
||
| // WBS-075 | ||
| @PostMapping("/events/{eventId}/booths/{boothId}/qr") | ||
| public ApiResponse<BoothQrResponseDto> issueQr( | ||
| @PathVariable Long eventId, | ||
| @PathVariable Long boothId, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.issueQr(eventId, boothId, member)); | ||
| } | ||
|
|
||
| // WBS-076 | ||
| @GetMapping("/events/{eventId}/booths/{boothId}/qr") | ||
| public ApiResponse<BoothQrResponseDto> getQr( | ||
| @PathVariable Long eventId, | ||
| @PathVariable Long boothId, | ||
| @AuthenticationPrincipal AuthenticatedMemberDto member) { | ||
| return ApiResponse.success(boothService.getQr(eventId, boothId, member)); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
BE/src/main/java/com/min/edu/booth/dto/BoothBulkCreateRequestDto.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| package com.min.edu.booth.dto; | ||
|
|
||
| import java.math.BigDecimal; | ||
| import java.util.List; | ||
|
|
||
| import jakarta.validation.constraints.DecimalMin; | ||
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.NotEmpty; | ||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor | ||
| public class BoothBulkCreateRequestDto { | ||
|
|
||
| @NotEmpty | ||
| private List<@NotBlank String> boothCodes; | ||
|
|
||
| @NotBlank | ||
| private String boothType; | ||
|
|
||
| private String floorName; | ||
|
|
||
| private String zoneName; | ||
|
|
||
| private String locationDescription; | ||
|
|
||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal widthMeter; | ||
|
|
||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal depthMeter; | ||
|
|
||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal areaSqm; | ||
|
|
||
| private List<String> basicEquipment; | ||
|
|
||
| private boolean electricityAvailable; | ||
|
|
||
| private boolean waterAvailable; | ||
|
|
||
| private boolean drainageAvailable; | ||
|
|
||
| private boolean internetAvailable; | ||
|
|
||
| @NotNull | ||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal price; | ||
| } | ||
51 changes: 51 additions & 0 deletions
51
BE/src/main/java/com/min/edu/booth/dto/BoothCreateRequestDto.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package com.min.edu.booth.dto; | ||
|
|
||
| import java.math.BigDecimal; | ||
| import java.util.List; | ||
|
|
||
| import jakarta.validation.constraints.DecimalMin; | ||
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor | ||
| public class BoothCreateRequestDto { | ||
|
|
||
| @NotBlank | ||
| private String boothCode; | ||
|
|
||
| @NotBlank | ||
| private String boothType; | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| private String floorName; | ||
|
|
||
| private String zoneName; | ||
|
|
||
| private String locationDescription; | ||
|
|
||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal widthMeter; | ||
|
|
||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal depthMeter; | ||
|
|
||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal areaSqm; | ||
|
|
||
| private List<String> basicEquipment; | ||
|
|
||
| private boolean electricityAvailable; | ||
|
|
||
| private boolean waterAvailable; | ||
|
|
||
| private boolean drainageAvailable; | ||
|
|
||
| private boolean internetAvailable; | ||
|
|
||
| @NotNull | ||
| @DecimalMin(value = "0", inclusive = true) | ||
| private BigDecimal price; | ||
| } | ||
23 changes: 23 additions & 0 deletions
23
BE/src/main/java/com/min/edu/booth/dto/BoothIntroUpdateRequestDto.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package com.min.edu.booth.dto; | ||
|
|
||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor | ||
| public class BoothIntroUpdateRequestDto { | ||
|
|
||
| @Size(max = 150) | ||
| private String displayName; | ||
|
|
||
| @Size(max = 300) | ||
| private String shortIntro; | ||
|
|
||
| private String description; | ||
|
|
||
| private String exhibitionContent; | ||
|
|
||
| private Long representativeFileId; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.