+8
-6
@@ -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
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user