-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [FEAT] 퀴즈 이미지 S3에 업로드 기능 추가 * [FiX] 퀴즈 정답 수정 요청에서 이미지를 멀티파트로 받도록 수정 * [FiX] 퀴즈 정답 정보 엔티티 업데이트 메소드 수정 * [FiX] 퀴즈 에러 코드 추가 * [FiX] 응모 에러코드 추가 * [FEAT] 일자별 응모 정보 응답 객체 추가 * [FEAT] 일자별 응모 정보 수정 요청 객체 추가 * [FEAT] 일자별 응모 정보 업데이트 메서드, 생성자 추가 * [FEAT] 일자별 응모 정보 수정/생성 기능 구현 * [FEAT] 일자별 응모 정보 수정/생성/조회 엔드포인트 추가 * [FEAT] 검증 메시지 추가 * [FEAT] 응모 수정/생성 요청 객체 검증 처리
- Loading branch information
1 parent
54733b0
commit 0a8e91b
Showing
11 changed files
with
262 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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 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
20 changes: 12 additions & 8 deletions
20
src/main/java/softeer/team_pineapple_be/domain/draw/exception/DrawErrorCode.java
This file contains 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 |
---|---|---|
@@ -1,20 +1,24 @@ | ||
package softeer.team_pineapple_be.domain.draw.exception; | ||
|
||
import org.springframework.http.HttpStatus; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
import softeer.team_pineapple_be.global.exception.ErrorCode; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum DrawErrorCode implements ErrorCode { | ||
|
||
NO_PRIZE(HttpStatus.BAD_REQUEST, "상품이 존재하지 않습니다."), | ||
CANNOT_ENTER_DRAW(HttpStatus.BAD_REQUEST, "상품 응모 조건에 부합하지 않습니다."), | ||
NO_VALID_PRIZE(HttpStatus.BAD_REQUEST, "상품의 개수와 유효성이 일치하지 않습니다."), | ||
NOT_PRIZE_OWNER(HttpStatus.BAD_REQUEST, " 해당 상품의 당첨자가 아닙니다."), | ||
NOT_VALID_DATE(HttpStatus.BAD_REQUEST, "상품 추첨이 가능하지 않은 날짜입니다."); | ||
NO_PRIZE(HttpStatus.BAD_REQUEST, "상품이 존재하지 않습니다."), | ||
CANNOT_ENTER_DRAW(HttpStatus.BAD_REQUEST, "상품 응모 조건에 부합하지 않습니다."), | ||
NO_VALID_PRIZE(HttpStatus.BAD_REQUEST, "상품의 개수와 유효성이 일치하지 않습니다."), | ||
NOT_PRIZE_OWNER(HttpStatus.BAD_REQUEST, " 해당 상품의 당첨자가 아닙니다."), | ||
NOT_VALID_DATE(HttpStatus.BAD_REQUEST, "상품 추첨이 가능하지 않은 날짜입니다."), | ||
NO_DAILY_INFO(HttpStatus.BAD_REQUEST, "일자별 응모 정보가 존재하지 않습니다"), | ||
DAILY_INFO_WIN_IMAGE_UPLOAD_FAILED(HttpStatus.BAD_REQUEST, "응모 성공 이미지 업로드에 실패했습니다."), | ||
DAILY_INFO_LOSE_IMAGE_UPLOAD_FAILED(HttpStatus.BAD_REQUEST, "응모 실패 이미지 업로드에 실패했습니다."); | ||
|
||
private final HttpStatus httpStatus; | ||
private final String message; | ||
private final HttpStatus httpStatus; | ||
private final String message; | ||
} |
35 changes: 35 additions & 0 deletions
35
...ain/java/softeer/team_pineapple_be/domain/draw/request/DrawDailyMessageModifyRequest.java
This file contains 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,35 @@ | ||
package softeer.team_pineapple_be.domain.draw.request; | ||
|
||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
import java.time.LocalDate; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
/** | ||
* 일자별 응모 정보 수정 요청 객체 | ||
*/ | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Setter | ||
@Getter | ||
public class DrawDailyMessageModifyRequest { | ||
@NotNull(message = "{draw.win_message_required}") | ||
private String winMessage; | ||
@NotNull(message = "{draw.lose_message_required}") | ||
private String loseMessage; | ||
@NotNull(message = "{draw.lose_scenario_required}") | ||
private String loseScenario; | ||
@NotNull(message = "{draw.win_image_required}") | ||
private MultipartFile winImage; | ||
@NotNull(message = "{draw.lose_image_required}") | ||
private MultipartFile loseImage; | ||
@NotNull(message = "{draw.common_scenario_required}") | ||
private String commonScenario; | ||
@NotNull(message = "{draw.draw_date_required}") | ||
private LocalDate drawDate; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/softeer/team_pineapple_be/domain/draw/response/DrawDailyMessageResponse.java
This file contains 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,27 @@ | ||
package softeer.team_pineapple_be.domain.draw.response; | ||
|
||
import java.time.LocalDate; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
/** | ||
* 일자별 응모 정보 응답 객체 | ||
*/ | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@Builder | ||
public class DrawDailyMessageResponse { | ||
private String winMessage; | ||
private String loseMessage; | ||
private String loseScenario; | ||
private String winImage; | ||
private String loseImage; | ||
private String commonScenario; | ||
private LocalDate drawDate; | ||
} |
This file contains 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 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 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
Oops, something went wrong.