update cart
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-30 03:54:12 +07:00
parent 323f50fb43
commit 073a7e6d8c
10 changed files with 207 additions and 163 deletions
+8 -6
View File
@@ -37,9 +37,9 @@ service CRM {
body: "order"
};
}
rpc GetCard(CardReq) returns (CardRsp) {
rpc GetCart(CartReq) returns (CartRsp) {
option (google.api.http) = {
post: "/card"
post: "/cart"
body: "items"
};
}
@@ -146,7 +146,7 @@ message OrderItem {
int64 count = 2;
}
message CardItem {
message CartItem {
int64 id = 1;
string article = 2;
string name = 3;
@@ -161,12 +161,14 @@ message CardItem {
repeated Label labels = 14;
}
message CardReq {
message CartReq {
repeated OrderItem items = 1;
}
message CardRsp {
repeated CardItem items = 1;
message CartRsp {
repeated CartItem items = 1;
int64 amount = 2;
int64 amountOld = 3;
}
message GetImageReq {
+9 -1
View File
@@ -1,10 +1,14 @@
POST http://localhost:8090/card
POST http://localhost:8090/cart
content-type: application/json
[
{
"product_id": 1,
"count": 7
},
{
"product_id": 20,
"count": 15
}
]
@@ -20,6 +24,10 @@ content-type: application/json
{
"product_id": 1,
"count": 7
},
{
"product_id": 20,
"count": 15
}
]
}