Merge branch 'feature/mhw-v1.01' of gitee.com:fusenpack/fusenapi into feature/mhw-v1.01

This commit is contained in:
momo
2023-09-15 17:59:59 +08:00
3 changed files with 44 additions and 0 deletions

View File

@@ -21,6 +21,9 @@ service shopping-cart {
//获取购物车列表
@handler GetCartsHandler
get /api/shopping-cart/get_carts(GetCartsReq) returns (response);
//计算购物车价格
@handler CalculateCartPriceHandler
post /api/shopping-cart/calculate_cart_price(CalculateCartPriceReq) returns (response);
}
//加入购物车
@@ -90,4 +93,21 @@ type DiyInformation {
Website string `json:"website"`
Qrcode string `json:"qrcode"`
Slogan string `json:"slogan"`
}
//计算购物车价格
type CalculateCartPriceReq {
CalculateList []CalculateItem `json:"calculate_list"`
}
type CalculateItem {
CartId int64 `json:"cart_id"` //购物车id
PurchaseQuantity int64 `json:"purchase_quantity"` //数量
}
type CalculateCartPriceRsp {
CalculateResultList []CalculateResultItem `json:"calculate_result_list"`
}
type CalculateResultItem {
CartId int64 `json:"cart_id"` //购物车id
ItemPrice string `json:"item_price"` //单价
TotalPrice string `json:"total_price"` //总价
}