-
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.
Showing
25 changed files
with
417 additions
and
25 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
22 changes: 22 additions & 0 deletions
22
...ion-api/src/main/java/org/sopt/makers/operation/web/banner/dto/request/BannerRequest.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,22 @@ | ||
package org.sopt.makers.operation.web.banner.dto.request; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import java.time.*; | ||
import lombok.*; | ||
|
||
@RequiredArgsConstructor(access = PRIVATE) | ||
public class BannerRequest { | ||
|
||
public record BannerCreate( | ||
@JsonProperty("location") String bannerLocation, | ||
@JsonProperty("content_type") String bannerType, | ||
@JsonProperty("publisher") String publisher, | ||
@JsonProperty("start_date") LocalDate startDate, | ||
@JsonProperty("end_date") LocalDate endDate, | ||
@JsonProperty("link") String link, | ||
@JsonProperty("image_pc") String pcImage, | ||
@JsonProperty("image_mobile") String mobileImage | ||
) {} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerService.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,8 +1,13 @@ | ||
package org.sopt.makers.operation.web.banner.service; | ||
|
||
import org.sopt.makers.operation.web.banner.dto.request.*; | ||
import org.sopt.makers.operation.web.banner.dto.response.BannerResponse; | ||
|
||
public interface BannerService { | ||
|
||
BannerResponse.BannerDetail getBannerDetail(final long bannerId); | ||
|
||
BannerResponse.ImagePreSignedUrl getIssuedPreSignedUrlForPutImage(String contentName, String imageType, String imageExtension, String contentType); | ||
|
||
BannerResponse.BannerDetail createBanner(BannerRequest.BannerCreate request); | ||
} |
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
15 changes: 15 additions & 0 deletions
15
...tion-common/src/main/java/org/sopt/makers/operation/code/failure/ExternalFailureCode.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,15 @@ | ||
package org.sopt.makers.operation.code.failure; | ||
|
||
import static org.springframework.http.HttpStatus.*; | ||
|
||
import lombok.*; | ||
import org.springframework.http.*; | ||
|
||
@RequiredArgsConstructor | ||
@Getter | ||
public enum ExternalFailureCode implements FailureCode { | ||
NOT_FOUND_S3_RESOURCE(NOT_FOUND, "S3에서 객체를 찾지 못했습니다"); | ||
|
||
private final HttpStatus status; | ||
private final String message; | ||
} |
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
15 changes: 15 additions & 0 deletions
15
operation-common/src/main/java/org/sopt/makers/operation/exception/ExternalException.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,15 @@ | ||
package org.sopt.makers.operation.exception; | ||
|
||
import lombok.*; | ||
import org.sopt.makers.operation.code.failure.*; | ||
|
||
@Getter | ||
public class ExternalException extends RuntimeException { | ||
private final FailureCode failureCode; | ||
|
||
public ExternalException(FailureCode failureCode) { | ||
super("[ExternalException] : " + failureCode.getMessage()); | ||
this.failureCode = failureCode; | ||
} | ||
|
||
} |
Oops, something went wrong.