-
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.
Merge [REFACTOR] 장바구니 수량 일괄 수정 도입 및 명세서 설명 추가
[REFACTOR] 장바구니 수량 일괄 수정 도입 및 명세서 설명 추가
- Loading branch information
Showing
9 changed files
with
64 additions
and
34 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
17 changes: 17 additions & 0 deletions
17
server/src/main/java/org/tattour/server/domain/cart/controller/dto/request/CartCountReq.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,17 @@ | ||
package org.tattour.server.domain.cart.controller.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import javax.validation.constraints.NotNull; | ||
import lombok.Getter; | ||
|
||
@Schema(description = "장바구니 수량 수정 Request") | ||
@Getter | ||
public class CartCountReq { | ||
@Schema(description = "장바구니 Id") | ||
@NotNull(message = "장바구니 id는 null일 수 없습니다.") | ||
private int cartId; | ||
|
||
@Schema(description = "장바구니 수량") | ||
@NotNull(message = "장바구니 수량 null일 수 없습니다.") | ||
private int count; | ||
} |
7 changes: 5 additions & 2 deletions
7
...t/controller/dto/request/SaveCartReq.java → ...t/controller/dto/request/CartItemReq.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
12 changes: 12 additions & 0 deletions
12
...c/main/java/org/tattour/server/domain/cart/controller/dto/request/UpdateCartCountReq.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,12 @@ | ||
package org.tattour.server.domain.cart.controller.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import lombok.Getter; | ||
|
||
@Schema(description = "장바구니 수량 일괄 수정 Request") | ||
@Getter | ||
public class UpdateCartCountReq { | ||
@Schema(description = "장바구니 수량 수정 Request 목록") | ||
private List<CartCountReq> cartCountReqs; | ||
} |
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
7 changes: 4 additions & 3 deletions
7
server/src/main/java/org/tattour/server/domain/cart/facade/CartFacade.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,14 +1,15 @@ | ||
package org.tattour.server.domain.cart.facade; | ||
|
||
import org.tattour.server.domain.cart.controller.dto.request.SaveCartReq; | ||
import org.tattour.server.domain.cart.controller.dto.request.CartItemReq; | ||
import org.tattour.server.domain.cart.controller.dto.request.UpdateCartCountReq; | ||
import org.tattour.server.domain.cart.controller.dto.response.CartItemsRes; | ||
|
||
public interface CartFacade { | ||
void saveCartItem(int userId, SaveCartReq req); | ||
void saveCartItem(int userId, CartItemReq req); | ||
|
||
CartItemsRes getUserCartItems(int userId); | ||
|
||
void increaseCartCount(int userId, int cartId); | ||
void updateCartsCount(int userId, UpdateCartCountReq req); | ||
|
||
void deleteCartItem(int userId, int cartId); | ||
} |
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