fusenapi/server_api/order.api
2023-09-15 17:58:45 +08:00

42 lines
897 B
Plaintext

syntax = "v1"
info (
title: "订单模块"
desc: "订单相关"
author: ""
email: ""
)
import "basic.api"
service order {
@handler CreateOrderHandler
post /api/order/create(CreateOrderReq) returns (response);
@handler CreatePrePaymentHandler
post /api/order/create-prepayment(CreatePrePaymentReq) returns (response);
@handler OrderListHandler
post /api/order/list(OrderListReq) returns (response);
}
type CreateOrderReq struct {
CartIds []int64 `json:"cart_ids"`
DeliveryMethod string `json:"delivery_method,options=[1,2]"`
}
type CreatePrePaymentReq struct {
OrderSn string `json:"order_sn"`
DeliveryMethod int `json:"delivery_method"`
DeliveryAddres struct {
Address string `json:"address,optional"`
Name string `json:"name,optional"`
Mobile string `json:"mobile,optional"`
} `json:"delivery_addres,optional"`
}
type OrderListReq struct {
}