diff --git a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApi.java b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApi.java index 7109f7f7..de4e73f3 100644 --- a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApi.java +++ b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApi.java @@ -32,6 +32,25 @@ public interface BannerApi { ) ResponseEntity> getBannerDetail(Long bannerId); + @Operation( + summary = "배너 목록 조회 API", + responses = { + @ApiResponse( + responseCode = "200", + description = "배너 목록 조회 성공" + ), + @ApiResponse( + responseCode = "400", + description = "잘못된 요청

1. 존재하지 않는 Parameter Key
2. 존재하지 않는 Parameter Value" + ), + @ApiResponse( + responseCode = "500", + description = "서버 내부 오류" + ) + } + ) + ResponseEntity> getBanners(String status, String sort); + @Operation( summary = "배너 삭제 API", responses = { diff --git a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApiController.java b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApiController.java index 41a83cc9..d18d9d23 100644 --- a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApiController.java +++ b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/api/BannerApiController.java @@ -3,12 +3,11 @@ import lombok.RequiredArgsConstructor; import lombok.val; -import org.sopt.makers.operation.code.success.web.BannerSuccessCode; import org.sopt.makers.operation.dto.BaseResponse; import org.sopt.makers.operation.util.ApiResponseUtil; import org.sopt.makers.operation.web.banner.dto.request.BannerRequest; -import org.sopt.makers.operation.web.banner.dto.request.BannerRequest.BannerCreate; import org.sopt.makers.operation.web.banner.service.BannerService; +import org.sopt.makers.operation.web.banner.service.BannerService.FilterCriteria; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; @@ -17,11 +16,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import static org.sopt.makers.operation.code.success.web.BannerSuccessCode.SUCCESS_CREATE_BANNER; -import static org.sopt.makers.operation.code.success.web.BannerSuccessCode.SUCCESS_DELETE_BANNER; -import static org.sopt.makers.operation.code.success.web.BannerSuccessCode.SUCCESS_GET_BANNER_DETAIL; -import static org.sopt.makers.operation.code.success.web.BannerSuccessCode.SUCCESS_GET_BANNER_IMAGE_PRE_SIGNED_URL; -import static org.sopt.makers.operation.code.success.web.BannerSuccessCode.SUCCESS_GET_EXTERNAL_BANNERS; +import static org.sopt.makers.operation.code.success.web.BannerSuccessCode.*; +import static org.sopt.makers.operation.web.banner.service.BannerService.*; import org.springframework.web.bind.annotation.*; @@ -41,6 +37,19 @@ public ResponseEntity> getBannerDetail( return ApiResponseUtil.success(SUCCESS_GET_BANNER_DETAIL, response); } + @Override + @GetMapping + public ResponseEntity> getBanners( + @RequestParam(value = "filter", required = false, defaultValue = "all") String filterCriteriaParameter, + @RequestParam(value = "sort", required = false, defaultValue = "status") String sortCriteriaParameter + ) { + val progressStatus = FilterCriteria.fromParameter(filterCriteriaParameter); + val sortCriteria = SortCriteria.fromParameter(sortCriteriaParameter); + + val response = bannerService.getBanners(progressStatus, sortCriteria); + return ApiResponseUtil.success(SUCCESS_GET_BANNER_LIST, response); + } + @Override @DeleteMapping("/{bannerId}") public ResponseEntity> deleteBanner( diff --git a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/dto/response/BannerResponse.java b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/dto/response/BannerResponse.java index 6f60e2a5..0da61b52 100644 --- a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/dto/response/BannerResponse.java +++ b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/dto/response/BannerResponse.java @@ -14,6 +14,30 @@ @RequiredArgsConstructor(access = PRIVATE) public final class BannerResponse { + @Builder(access = PRIVATE) + public record BannerSimple ( + @JsonProperty("id") long bannerId, + @JsonProperty("status") String bannerStatus, + @JsonProperty("location") String bannerLocation, + @JsonProperty("content_type") String bannerType, + @JsonProperty("publisher") String publisher, + @JsonProperty("start_date") LocalDate startDate, + @JsonProperty("end_date") LocalDate endDate + ) { + public static BannerSimple fromEntity(Banner banner) { + return BannerSimple.builder() + .bannerId(banner.getId()) + .bannerStatus(banner.getPeriod().getPublishStatus(LocalDate.now()).getValue()) + .bannerLocation(banner.getLocation().getValue()) + .bannerType(banner.getContentType().getValue()) + .publisher(banner.getPublisher()) + .startDate(banner.getPeriod().getStartDate()) + .endDate(banner.getPeriod().getEndDate()) + .build(); + } + } + + @Builder(access = PRIVATE) public record BannerDetail( @JsonProperty("id") long bannerId, diff --git a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerService.java b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerService.java index a30548ed..006d1403 100644 --- a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerService.java +++ b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerService.java @@ -1,7 +1,10 @@ package org.sopt.makers.operation.web.banner.service; +import java.util.Arrays; import java.util.List; +import org.sopt.makers.operation.code.failure.BannerFailureCode; +import org.sopt.makers.operation.exception.BannerException; import org.sopt.makers.operation.web.banner.dto.request.*; import org.sopt.makers.operation.web.banner.dto.response.BannerResponse; import org.sopt.makers.operation.web.banner.dto.response.BannerResponse.BannerImageUrl; @@ -17,5 +20,47 @@ public interface BannerService { BannerResponse.ImagePreSignedUrl getIssuedPreSignedUrlForPutImage(String contentName, String imageType, String imageExtension, String contentType); BannerResponse.BannerDetail createBanner(BannerRequest.BannerCreate request); + + List getBanners(final FilterCriteria status, final SortCriteria sort); + + enum FilterCriteria { + ALL("all"), + RESERVED("reserved"), + IN_PROGRESS("in_progress"), + DONE("done"), + ; + private final String parameter; + + FilterCriteria(String parameter) { + this.parameter = parameter; + } + + public String getParameter() { + return this.parameter; + } + + public static FilterCriteria fromParameter(String parameter) { + return Arrays.stream(FilterCriteria.values()) + .filter(value -> value.parameter.equals(parameter)) + .findAny().orElseThrow(() -> new BannerException(BannerFailureCode.INVALID_BANNER_PROGRESS_STATUS_PARAMETER)); + } + + } + enum SortCriteria { + START_DATE("start_date"), + END_DATE("end_date"), + STATUS("status") + ; + private final String parameter; + + SortCriteria(String parameter) { + this.parameter = parameter; + } + public static SortCriteria fromParameter(String parameter) { + return Arrays.stream(SortCriteria.values()) + .filter(value -> value.parameter.equals(parameter)) + .findAny().orElseThrow(() -> new BannerException(BannerFailureCode.INVALID_BANNER_SORT_CRITERIA_PARAMETER)); + } + } } diff --git a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerServiceImpl.java b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerServiceImpl.java index ac40c5cd..d0ade422 100644 --- a/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerServiceImpl.java +++ b/operation-api/src/main/java/org/sopt/makers/operation/web/banner/service/BannerServiceImpl.java @@ -1,7 +1,8 @@ package org.sopt.makers.operation.web.banner.service; +import java.time.Clock; +import java.util.Comparator; import java.util.List; -import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import lombok.val; import org.sopt.makers.operation.banner.domain.Banner; @@ -9,8 +10,6 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; -import lombok.RequiredArgsConstructor; -import lombok.val; import org.sopt.makers.operation.banner.domain.*; import org.sopt.makers.operation.banner.repository.BannerRepository; @@ -32,6 +31,7 @@ public class BannerServiceImpl implements BannerService { private final BannerRepository bannerRepository; private final S3Service s3Service; private final ValueConfig valueConfig; + private final Clock clock; @Override public BannerResponse.BannerDetail getBannerDetail(final long bannerId) { @@ -53,7 +53,7 @@ public List getExternalBanners(final String image List list = bannerList.stream() .map( banner -> banner.getImage().retrieveImageUrl(imageType)) - .collect(Collectors.toUnmodifiableList()); + .toList(); return BannerResponse.BannerImageUrl.fromEntity(list); } @@ -75,7 +75,7 @@ public BannerResponse.ImagePreSignedUrl getIssuedPreSignedUrlForPutImage(String } private String getBannerImageName(String location, String contentName, String imageType, String imageExtension) { - val today = LocalDate.now(); + val today = LocalDate.now(clock); val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); val formattedDate = today.format(formatter); @@ -100,6 +100,39 @@ public BannerDetail createBanner(BannerCreate request) { return BannerResponse.BannerDetail.fromEntity(banner); } + @Override + public List getBanners(FilterCriteria filter, SortCriteria sort) { + val allBanners = bannerRepository.findAll(); + val filteredBanners = getFilteredBanners(allBanners, filter); + val resultBanners = getSortedBanners(filteredBanners, sort); + return resultBanners.stream() + .map(BannerSimple::fromEntity) + .toList(); + } + + private List getFilteredBanners(List banners, FilterCriteria filter) { + if (FilterCriteria.ALL.equals(filter)) { + return banners; + } + val targetStatus = PublishStatus.getByValue(filter.getParameter()); + return banners.stream() + .filter(banner -> targetStatus.equals(banner.getPeriod().getPublishStatus(LocalDate.now(clock)))) + .toList(); + } + + private List getSortedBanners(List banners, SortCriteria criteria) { + return switch (criteria) { + case STATUS, START_DATE -> banners.stream().sorted( + Comparator.comparing(Banner::getPeriod, (p1, p2) -> p2.getStartDate().compareTo(p1.getStartDate())) + .thenComparing(Banner::getPeriod, Comparator.comparing(PublishPeriod::getEndDate)) + ).toList(); + case END_DATE -> banners.stream().sorted( + Comparator.comparing(Banner::getPeriod, Comparator.comparing(PublishPeriod::getEndDate)) + .thenComparing(Banner::getPeriod, (p1, p2) -> p2.getStartDate().compareTo(p1.getStartDate())) + ).toList(); + }; + } + private PublishPeriod getPublishPeriod(LocalDate startDate, LocalDate endDate) { return PublishPeriod.builder() .startDate(startDate) diff --git a/operation-api/src/main/resources/data/insert-get-banners-data.sql b/operation-api/src/main/resources/data/insert-get-banners-data.sql new file mode 100644 index 00000000..3daed724 --- /dev/null +++ b/operation-api/src/main/resources/data/insert-get-banners-data.sql @@ -0,0 +1,57 @@ +CREATE TABLE if not exists banners ( + id bigserial not null, + created_date timestamp(6), + last_modified_date timestamp(6), + content_type varchar(255) not null, + img_url_mobile varchar(255) not null, + img_url_pc varchar(255) not null, + link varchar(255), + location varchar(255) not null, + end_date date not null, + start_date date not null, + publisher varchar(255) not null, + primary key (id) +); + +DELETE FROM banners; + +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2031-06-10', '2031-06-17','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2031-06-01', '2031-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2031-01-01', '2031-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2030-01-01', '2030-12-31','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2030-01-01', '2030-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2030-01-01', '2030-12-31','user'); + +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2024-12-01', '2024-12-31','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2024-12-01', '2025-12-01','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2024-01-01', '2025-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2024-06-30', '2025-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2024-06-30', '2025-01-01','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2024-01-01', '2025-01-01','user'); + +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2011-06-10', '2011-06-17','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2011-06-01', '2011-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2011-01-01', '2011-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2010-01-01', '2011-12-31','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2010-01-01', '2010-06-30','user'); +INSERT INTO banners (content_type, img_url_mobile, img_url_pc, location, start_date, end_date, publisher) +VALUES ('PRODUCT', '','','PLAYGROUND_COMMUNITY','2010-01-01', '2010-12-31','user'); + + diff --git a/operation-api/src/test/java/org/sopt/makers/operation/web/banner/service/BannerServiceTest.java b/operation-api/src/test/java/org/sopt/makers/operation/web/banner/service/BannerServiceTest.java new file mode 100644 index 00000000..dad8b0e2 --- /dev/null +++ b/operation-api/src/test/java/org/sopt/makers/operation/web/banner/service/BannerServiceTest.java @@ -0,0 +1,77 @@ +package org.sopt.makers.operation.web.banner.service; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.sopt.makers.operation.banner.domain.PublishPeriod; +import org.sopt.makers.operation.banner.domain.PublishStatus; +import org.sopt.makers.operation.banner.repository.BannerRepository; +import org.sopt.makers.operation.client.s3.S3Service; +import org.sopt.makers.operation.config.ValueConfig; +import org.sopt.makers.operation.web.banner.dto.response.BannerResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.jdbc.Sql; + +import java.time.LocalDate; +import java.time.Clock; +import java.time.Instant; +import java.time.ZoneId; +import java.util.List; +import java.util.stream.Stream; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.sopt.makers.operation.web.banner.service.BannerService.*; + +@SpringBootTest +@ActiveProfiles("test") +@Sql(scripts = "classpath:data/insert-get-banners-data.sql") +class BannerServiceTest { + private static final Clock TEST_CLOCK = Clock.fixed(Instant.parse("2024-12-28T00:00:00Z"), ZoneId.systemDefault()); + @Autowired + private BannerRepository bannerRepository; + @MockBean + private S3Service s3Service; + @Autowired + private ValueConfig valueConfig; + + private BannerService bannerService; + + @BeforeEach + void setBannerService() { + bannerService = new BannerServiceImpl(bannerRepository, s3Service, valueConfig, TEST_CLOCK); + } + + @ParameterizedTest + @MethodSource("argsForGetBanners") + void getBanners( + FilterCriteria givenFilter, + SortCriteria givenSort, + int expectedSize, + PublishStatus expectedStatus + ) { + List banners = bannerService.getBanners(givenFilter, givenSort); + + assertThat(banners) + .hasSize(expectedSize) + .extracting(info -> PublishPeriod.builder().startDate(info.startDate()).endDate(info.endDate()).build()) + .allMatch(period -> { + if (givenFilter.equals(FilterCriteria.ALL)) { + return true; + } + return period.getPublishStatus(LocalDate.now(TEST_CLOCK)).equals(expectedStatus); + }); + } + static Stream argsForGetBanners(){ + return Stream.of( + Arguments.of(FilterCriteria.RESERVED, SortCriteria.START_DATE, 6, PublishStatus.RESERVED), + Arguments.of(FilterCriteria.ALL, SortCriteria.START_DATE, 18, null), + Arguments.of(FilterCriteria.IN_PROGRESS, SortCriteria.START_DATE, 6, PublishStatus.IN_PROGRESS), + Arguments.of(FilterCriteria.DONE, SortCriteria.START_DATE, 6, PublishStatus.DONE) + ); + } + +} \ No newline at end of file diff --git a/operation-common/src/main/java/org/sopt/makers/operation/code/failure/BannerFailureCode.java b/operation-common/src/main/java/org/sopt/makers/operation/code/failure/BannerFailureCode.java index d25ad9f8..6a03c02d 100644 --- a/operation-common/src/main/java/org/sopt/makers/operation/code/failure/BannerFailureCode.java +++ b/operation-common/src/main/java/org/sopt/makers/operation/code/failure/BannerFailureCode.java @@ -19,8 +19,10 @@ public enum BannerFailureCode implements FailureCode { NOT_FOUNT_BANNER(NOT_FOUND, "존재하지 않는 배너입니다."), NOT_SUPPORTED_PLATFORM_TYPE(NOT_FOUND, "지원하지 않는 플랫폼 유형입니다."), NOT_FOUND_BANNER(NOT_FOUND, "존재하지 않는 배너입니다."), - NOT_FOUND_BANNER_IMAGE(NOT_FOUND, "존재하지 않는 배너 이미지입니다.") + NOT_FOUND_BANNER_IMAGE(NOT_FOUND, "존재하지 않는 배너 이미지입니다."), + INVALID_BANNER_PROGRESS_STATUS_PARAMETER(BAD_REQUEST, "올바르지 않은 배너 진행 상태 조건입니다."), + INVALID_BANNER_SORT_CRITERIA_PARAMETER(BAD_REQUEST, "올바르지 않은 배너 정렬 조건입니다."), ; private final HttpStatus status; diff --git a/operation-common/src/main/java/org/sopt/makers/operation/code/success/web/BannerSuccessCode.java b/operation-common/src/main/java/org/sopt/makers/operation/code/success/web/BannerSuccessCode.java index 8c2f063f..793b6884 100644 --- a/operation-common/src/main/java/org/sopt/makers/operation/code/success/web/BannerSuccessCode.java +++ b/operation-common/src/main/java/org/sopt/makers/operation/code/success/web/BannerSuccessCode.java @@ -11,6 +11,7 @@ @RequiredArgsConstructor(access = PRIVATE) public enum BannerSuccessCode implements SuccessCode { SUCCESS_GET_BANNER_DETAIL(HttpStatus.OK, "배너 상세 정보 조회 성공"), + SUCCESS_GET_BANNER_LIST(HttpStatus.OK, "배너 목록 정보 조회 성공"), SUCCESS_DELETE_BANNER(HttpStatus. NO_CONTENT, "배너 삭제 성공"), SUCCESS_GET_EXTERNAL_BANNERS(HttpStatus.OK, "외부 배너 조회 성공"), SUCCESS_GET_BANNER_IMAGE_PRE_SIGNED_URL(HttpStatus.OK, "이미지 업로드 pre signed url 조회에 성공했습니다"), diff --git a/operation-common/src/main/java/org/sopt/makers/operation/config/TimeConfig.java b/operation-common/src/main/java/org/sopt/makers/operation/config/TimeConfig.java new file mode 100644 index 00000000..2a2fe95a --- /dev/null +++ b/operation-common/src/main/java/org/sopt/makers/operation/config/TimeConfig.java @@ -0,0 +1,16 @@ +package org.sopt.makers.operation.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.time.Clock; + +@Configuration +public class TimeConfig { + + @Bean + public Clock clock() { + return Clock.systemDefaultZone(); + } + +} diff --git a/operation-domain/src/main/java/org/sopt/makers/operation/banner/domain/PublishStatus.java b/operation-domain/src/main/java/org/sopt/makers/operation/banner/domain/PublishStatus.java index 87286b6b..91ff74f4 100644 --- a/operation-domain/src/main/java/org/sopt/makers/operation/banner/domain/PublishStatus.java +++ b/operation-domain/src/main/java/org/sopt/makers/operation/banner/domain/PublishStatus.java @@ -20,9 +20,9 @@ public enum PublishStatus { private final String value; - public static PublishLocation getByValue(String value) { - return Arrays.stream(PublishLocation.values()) - .filter(location -> location.getValue().equals(value)) + public static PublishStatus getByValue(String value) { + return Arrays.stream(PublishStatus.values()) + .filter(status -> status.getValue().equals(value)) .findAny().orElseThrow(() -> new BannerException(BannerFailureCode.NOT_FOUND_STATUS)); } } diff --git a/operation-domain/src/test/java/org/sopt/makers/operation/banner/BannerTest.java b/operation-domain/src/test/java/org/sopt/makers/operation/banner/BannerTest.java index 1c111fcf..3c09b8d0 100644 --- a/operation-domain/src/test/java/org/sopt/makers/operation/banner/BannerTest.java +++ b/operation-domain/src/test/java/org/sopt/makers/operation/banner/BannerTest.java @@ -47,7 +47,6 @@ public class BannerTest { private static final LocalDate TEST_BANNER_END_DATE = LocalDate.of(2024, 12, 31); private static final String TEST_BANNER_PC_IMAGE_URL = "image-url-for-pc"; private static final String TEST_BANNER_MOBILE_IMAGE_URL = "image-url-for-mobile"; - private static final PublishPeriod TEST_PUBLISH_PERIOD = PublishPeriod.builder() .startDate(TEST_BANNER_START_DATE) .endDate(TEST_BANNER_END_DATE).build();