91 lines
2.4 KiB
Plaintext
91 lines
2.4 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "订单模块"
|
|
desc: "订单相关"
|
|
author: ""
|
|
email: ""
|
|
)
|
|
|
|
import "basic.api"
|
|
|
|
service order {
|
|
|
|
@handler CreateOrderHandler
|
|
post /api/order/create(CreateOrderReq) returns (response);
|
|
|
|
@handler CreatePrePaymentByDepositHandler
|
|
post /api/order/create-prepayment-deposit(CreatePrePaymentByDepositReq) returns (response);
|
|
|
|
@handler CreatePrePaymentByBalanceHandler
|
|
post /api/order/create-prepayment-balance(CreatePrePaymentByBalanceReq) returns (response);
|
|
|
|
@handler DeleteOrderHandler
|
|
post /api/order/delete(DeleteOrderReq) returns (response);
|
|
|
|
@handler CloseOrderHandler
|
|
post /api/order/close(CloseOrderReq) returns (response)
|
|
|
|
@handler OrderInvoiceHandler
|
|
get /api/order/invoice(OrderInvoiceReq) returns (response);
|
|
|
|
@handler OrderListHandler
|
|
get /api/order/list(OrderListReq) returns (response);
|
|
|
|
@handler OrderDetailHandler
|
|
get /api/order/detail(OrderDetailReq) returns (response);
|
|
|
|
}
|
|
|
|
type (
|
|
OrderInvoiceReq {
|
|
OrderSn string `form:"order_sn"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
CloseOrderReq {
|
|
OrderSn string `json:"order_sn"`
|
|
}
|
|
)
|
|
|
|
type DeleteOrderReq {
|
|
OrderSn string `json:"order_sn"`
|
|
}
|
|
|
|
type OrderDetailReq {
|
|
OrderSn string `form:"order_sn"`
|
|
}
|
|
|
|
type CreateOrderReq {
|
|
CartIds []int64 `json:"cart_ids"`
|
|
// DeliveryMethod int64 `json:"delivery_method,optional,options=[1,2],default=2"`
|
|
}
|
|
|
|
type CreatePrePaymentByDepositReq {
|
|
OrderSn string `json:"order_sn"`
|
|
DeliveryMethod int64 `json:"delivery_method,options=[1,2]"`
|
|
DeliveryAddress *DeliveryAddress `json:"delivery_address,optional"`
|
|
}
|
|
|
|
type DeliveryAddress {
|
|
Street string `json:"street,optional"` // 街道
|
|
City string `json:"city,optional"` // 城市
|
|
FirstName string `json:"first_name,optional"` // 姓
|
|
LastName string `json:"last_name,optional"` // 名
|
|
Mobile string `json:"mobile,optional"` // 手机
|
|
State string `json:"state,optional"` // 州
|
|
Suite string `json:"suite,optional"` // 房号
|
|
ZipCode string `json:"zip_code,optional"` // 邮编
|
|
}
|
|
|
|
type CreatePrePaymentByBalanceReq {
|
|
OrderSn string `json:"order_sn"`
|
|
}
|
|
|
|
type OrderListReq {
|
|
DeliveryMethod int64 `form:"delivery_method,options=[0,1,2],optional"`
|
|
OrderCycle string `form:"order_cycle,optional,options=[within_one_month,within_three_month,within_six_month,within_one_year]"`
|
|
CurrentPage int64 `form:"current_page,optional,default=1"`
|
|
PerPage int64 `form:"per_page,optional,default=10"`
|
|
} |