From e7152827c3c5cacabd777b933f5c89c3abe974d8 Mon Sep 17 00:00:00 2001 From: rightpair Date: Mon, 22 Jan 2024 16:19:39 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[feature]=20=EC=BF=A0=ED=8F=B0=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=9D=91=EB=8B=B5=EC=9D=98=20CouponUseConditionDay?= =?UTF-8?q?s=20=ED=95=84=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 설명: - 기존 CouponUseConditionDays를 CouponUseDaysType으로 수정했습니다. --- .../coolpeace/domain/coupon/dto/response/CouponResponse.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/coolpeace/domain/coupon/dto/response/CouponResponse.java b/src/main/java/com/coolpeace/domain/coupon/dto/response/CouponResponse.java index c8afd5b7..38d218f4 100644 --- a/src/main/java/com/coolpeace/domain/coupon/dto/response/CouponResponse.java +++ b/src/main/java/com/coolpeace/domain/coupon/dto/response/CouponResponse.java @@ -2,7 +2,6 @@ import com.coolpeace.domain.accommodation.entity.Accommodation; import com.coolpeace.domain.coupon.entity.Coupon; -import com.coolpeace.global.common.DayOfWeekUtil; import java.time.LocalDate; import java.util.List; @@ -18,7 +17,7 @@ public record CouponResponse( String customerType, String couponRoomType, Integer minimumReservationPrice, - List couponUseConditionDays, + String couponUseConditionDays, LocalDate exposureStartDate, LocalDate exposureEndDate, Integer couponExpiration, @@ -40,7 +39,7 @@ public static CouponResponse from(Coupon coupon) { coupon.getCustomerType().getValue(), coupon.getCouponRoomType().getValue(), coupon.getMinimumReservationPrice(), - DayOfWeekUtil.fromDayOfWeeks(coupon.getCouponUseConditionDays()), + coupon.getCouponUseDays().getValue(), coupon.getExposureStartDate(), coupon.getExposureEndDate(), coupon.getCouponExpiration(), From 0c91683ac3f7ac1ef4ad3a1363ba68c3d13a6f07 Mon Sep 17 00:00:00 2001 From: rightpair Date: Mon, 22 Jan 2024 16:20:31 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[test]=20=EC=BF=A0=ED=8F=B0=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=9D=91=EB=8B=B5=EC=9D=98=20CouponUseConditionDay?= =?UTF-8?q?s=20=ED=95=84=EB=93=9C=20=EC=88=98=EC=A0=95=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/coolpeace/docs/coupon/CouponControllerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/coolpeace/docs/coupon/CouponControllerTest.java b/src/test/java/com/coolpeace/docs/coupon/CouponControllerTest.java index 71697eb9..db530cd0 100644 --- a/src/test/java/com/coolpeace/docs/coupon/CouponControllerTest.java +++ b/src/test/java/com/coolpeace/docs/coupon/CouponControllerTest.java @@ -197,7 +197,7 @@ void searchCoupon_success() throws Exception { fieldWithPath("content[].customer_type").type(JsonFieldType.STRING).description("고객의 유형"), fieldWithPath("content[].coupon_room_type").type(JsonFieldType.STRING).description("객실의 유형"), fieldWithPath("content[].minimum_reservation_price").type(JsonFieldType.NUMBER).description("최소 예약 가격"), - fieldWithPath("content[].coupon_use_condition_days").type(JsonFieldType.ARRAY).description("쿠폰 사용 가능 요일"), + fieldWithPath("content[].coupon_use_condition_days").type(JsonFieldType.STRING).description("쿠폰 사용 가능 요일"), fieldWithPath("content[].exposure_start_date").type(JsonFieldType.STRING).description("노출 시작 날짜"), fieldWithPath("content[].exposure_end_date").type(JsonFieldType.STRING).description("노출 종료 날짜"), fieldWithPath("content[].coupon_expiration").type(JsonFieldType.NUMBER).description("쿠폰 만료 일자"), @@ -268,7 +268,7 @@ void getCouponRecentHistory_success() throws Exception { fieldWithPath("[].customer_type").type(JsonFieldType.STRING).description("고객의 유형"), fieldWithPath("[].coupon_room_type").type(JsonFieldType.STRING).description("객실의 유형"), fieldWithPath("[].minimum_reservation_price").type(JsonFieldType.NUMBER).description("최소 예약 가격"), - fieldWithPath("[].coupon_use_condition_days").type(JsonFieldType.ARRAY).description("쿠폰 사용 가능 요일"), + fieldWithPath("[].coupon_use_condition_days").type(JsonFieldType.STRING).description("쿠폰 사용 가능 요일"), fieldWithPath("[].exposure_start_date").type(JsonFieldType.STRING).description("노출 시작 날짜"), fieldWithPath("[].exposure_end_date").type(JsonFieldType.STRING).description("노출 종료 날짜"), fieldWithPath("[].coupon_expiration").type(JsonFieldType.NUMBER).description("쿠폰 만료 일자"), @@ -341,7 +341,7 @@ void getCouponByCouponNumber_success() throws Exception { fieldWithPath("customer_type").type(JsonFieldType.STRING).description("고객의 유형"), fieldWithPath("coupon_room_type").type(JsonFieldType.STRING).description("객실의 유형"), fieldWithPath("minimum_reservation_price").type(JsonFieldType.NUMBER).description("최소 예약 가격"), - fieldWithPath("coupon_use_condition_days").type(JsonFieldType.ARRAY).description("쿠폰 사용 가능 요일"), + fieldWithPath("coupon_use_condition_days").type(JsonFieldType.STRING).description("쿠폰 사용 가능 요일"), fieldWithPath("exposure_start_date").type(JsonFieldType.STRING).description("노출 시작 날짜"), fieldWithPath("exposure_end_date").type(JsonFieldType.STRING).description("노출 종료 날짜"), fieldWithPath("coupon_expiration").type(JsonFieldType.NUMBER).description("쿠폰 만료 일자"),