syntax = "v1" info ( title: "购物车服务" desc: // TODO: add description author: "ldm" email: "" ) import "basic.api" service shopping-cart-confirmation { //添加入购物车 @handler CartAddHandler post /cart/add (CartAddReq) returns (response); //删除购物车 @handler CartDeleteHandler post /cart/del (CartDeleteReq) returns (response); } //添加入购物车 type CartAddReq { DesignId string `json:"design_id"` //设计sn BuyNum int64 `json:"buy_num"` //购买数量 IsCheck int64 `json:"is_check,optional"` } //删除购物车 type CartDeleteReq { Id int64 `json:"id"` }