61 lines
1.5 KiB
Plaintext
61 lines
1.5 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 OrderListHandler
|
|
get /api/order/list(OrderListReq) returns (response);
|
|
|
|
@handler OrderDetailHandler
|
|
get /api/order/detail(OrderDetailReq) returns (response);
|
|
|
|
}
|
|
|
|
type OrderDetailReq {
|
|
OrderSn string `form:"order_sn"`
|
|
}
|
|
|
|
type CreateOrderReq {
|
|
CartIds []int64 `json:"cart_ids"`
|
|
DeliveryMethod int64 `json:"delivery_method,options=[1,2]"`
|
|
}
|
|
|
|
type CreatePrePaymentByDepositReq {
|
|
OrderSn string `json:"order_sn"`
|
|
DeliveryMethod int64 `json:"delivery_method,options=[1,2]"`
|
|
DeliveryAddres DeliveryAddres `json:"delivery_addres,optional"`
|
|
}
|
|
|
|
type DeliveryAddres {
|
|
Address string `json:"address,optional"`
|
|
Name string `json:"name,optional"`
|
|
Mobile string `json:"mobile,optional"`
|
|
}
|
|
|
|
type CreatePrePaymentByBalanceReq {
|
|
OrderSn string `json:"order_sn"`
|
|
}
|
|
|
|
type OrderListReq {
|
|
DeliveryMethod int64 `json:"delivery_method,options=[0,1,2],optional"`
|
|
OrderCycle string `json:"order_cycle,optional"`
|
|
Current_page int64 `json:"current_page,optional,default=1"`
|
|
Page_size int64 `json:"page_size,optional,default=10"`
|
|
} |