-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 어드민 혜택 상세 페이지 혜택문구 미리보기 추가 (#1132)
* feat: 특정 혜택 카테고리 상점 전체 조회에 혜택 문구 미리보기 추가 반환 * feat: 특정 혜택 카테고리 상점 전체 추가에 혜택 문구 미리보기 추가 * feat: 특정 혜택 카테고리 상점 수정 API 추가 * test: 특정 혜택 카테고리의 상점 전체 조회 테스트 추가 * test: 특정 혜택 카테고리의 상점 추가 테스트 작성 * test: 특정 혜택 카테고리의 상점들 수정 테스트 작성 * chore: 개행추가 * chore: 멀티라인 문자열로 변경 * chore: 멀티라인 문자열로 변경 * feat: 수정에서 shopId가 아닌 mapId를 이용하도록 변경 * feat: 불필요한 schema 삭제
- Loading branch information
1 parent
392dfab
commit 610fee0
Showing
11 changed files
with
282 additions
and
44 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
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
35 changes: 35 additions & 0 deletions
35
src/main/java/in/koreatech/koin/admin/benefit/dto/AdminModifyBenefitShopsRequest.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 in.koreatech.koin.admin.benefit.dto; | ||
|
||
import static com.fasterxml.jackson.databind.PropertyNamingStrategies.*; | ||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.databind.annotation.JsonNaming; | ||
|
||
import in.koreatech.koin.global.validation.NotBlankElement; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
|
||
@JsonNaming(SnakeCaseStrategy.class) | ||
public record AdminModifyBenefitShopsRequest( | ||
@NotNull(message = "혜택문구 변경정보 리스트는 필수입니다.") | ||
@NotBlankElement(message = "혜택문구 변경정보 리스트는 빈 요소가 존재할 수 없습니다.") | ||
List<InnerBenefitShopsRequest> modifyDetails | ||
) { | ||
|
||
@JsonNaming(SnakeCaseStrategy.class) | ||
public record InnerBenefitShopsRequest( | ||
@Schema(description = "상점혜택 매핑id", example = "2", requiredMode = REQUIRED) | ||
@NotNull(message = "상점혜택 매핑id는 필수입니다.") | ||
Integer shopBenefitMapId, | ||
|
||
@Schema(description = "혜택 미리보기 문구", example = "4인 이상 픽업서비스", requiredMode = REQUIRED) | ||
@NotBlank(message = "혜택 미리보기 문구는 필수입니다.") | ||
@Size(min = 2, max = 15, message = "혜택 미리보기 문구는 최소 2자 최대 15자입니다.") | ||
String detail | ||
) { | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/in/koreatech/koin/admin/benefit/exception/BenefitMapNotFoundException.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,20 @@ | ||
package in.koreatech.koin.admin.benefit.exception; | ||
|
||
import in.koreatech.koin.global.exception.DataNotFoundException; | ||
|
||
public class BenefitMapNotFoundException extends DataNotFoundException { | ||
|
||
private static final String DEFAULT_MESSAGE = "해당 혜택 카테고리에 존재하지 않는 입니다."; | ||
|
||
public BenefitMapNotFoundException(String message) { | ||
super(message); | ||
} | ||
|
||
public BenefitMapNotFoundException(String message, String detail) { | ||
super(message, detail); | ||
} | ||
|
||
public static BenefitMapNotFoundException withDetail(String detail) { | ||
return new BenefitMapNotFoundException(DEFAULT_MESSAGE, detail); | ||
} | ||
} |
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.