2023-09-15 09:58:45 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: "订单模块"
|
|
|
|
desc: "订单相关"
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
|
|
|
|
|
|
|
import "basic.api"
|
|
|
|
|
|
|
|
service order {
|
|
|
|
|
|
|
|
@handler CreateOrderHandler
|
|
|
|
post /api/order/create(CreateOrderReq) returns (response);
|
|
|
|
|
2023-09-21 04:11:15 +00:00
|
|
|
@handler CreatePrePaymentByDepositHandler
|
|
|
|
post /api/order/create-prepayment-deposit(CreatePrePaymentByDepositReq) returns (response);
|
|
|
|
|
|
|
|
@handler CreatePrePaymentByBalanceHandler
|
|
|
|
post /api/order/create-prepayment-balance(CreatePrePaymentByBalanceReq) returns (response);
|
2023-09-15 09:58:45 +00:00
|
|
|
|
|
|
|
@handler OrderListHandler
|
2023-09-21 02:30:36 +00:00
|
|
|
get /api/order/list(OrderListReq) returns (response);
|
2023-09-15 09:58:45 +00:00
|
|
|
|
2023-09-21 02:30:36 +00:00
|
|
|
@handler OrderDetailHandler
|
|
|
|
get /api/order/detail(OrderDetailReq) returns (response);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
type OrderDetailReq {
|
|
|
|
OrderSn string `form:"order_sn"`
|
2023-09-15 09:58:45 +00:00
|
|
|
}
|
|
|
|
|
2023-09-20 07:07:12 +00:00
|
|
|
type CreateOrderReq {
|
|
|
|
CartIds []int64 `json:"cart_ids"`
|
2023-09-22 02:39:02 +00:00
|
|
|
DeliveryMethod int64 `json:"delivery_method,optional,options=[1,2],default=2"`
|
2023-09-15 09:58:45 +00:00
|
|
|
}
|
|
|
|
|
2023-09-21 04:11:15 +00:00
|
|
|
type CreatePrePaymentByDepositReq {
|
2023-09-21 11:01:48 +00:00
|
|
|
OrderSn string `json:"order_sn"`
|
2023-09-22 02:39:02 +00:00
|
|
|
DeliveryMethod int64 `json:"delivery_method,optional,options=[1,2],default=2"`
|
2023-09-21 11:01:48 +00:00
|
|
|
DeliveryAddress *DeliveryAddress `json:"delivery_address,optional"`
|
2023-09-15 09:58:45 +00:00
|
|
|
}
|
|
|
|
|
2023-09-21 11:01:48 +00:00
|
|
|
type DeliveryAddress {
|
2023-09-20 07:07:12 +00:00
|
|
|
Address string `json:"address,optional"`
|
|
|
|
Name string `json:"name,optional"`
|
|
|
|
Mobile string `json:"mobile,optional"`
|
|
|
|
}
|
2023-09-15 09:58:45 +00:00
|
|
|
|
2023-09-21 04:11:15 +00:00
|
|
|
type CreatePrePaymentByBalanceReq {
|
|
|
|
OrderSn string `json:"order_sn"`
|
|
|
|
}
|
|
|
|
|
2023-09-20 07:07:12 +00:00
|
|
|
type OrderListReq {
|
2023-09-21 04:11:15 +00:00
|
|
|
DeliveryMethod int64 `json:"delivery_method,options=[0,1,2],optional"`
|
2023-09-21 11:01:48 +00:00
|
|
|
OrderCycle string `json:"order_cycle,optional,options=[within_one_month,within_three_month,within_six_month,within_one_year]"`
|
|
|
|
CurrentPage int64 `json:"current_page,optional,default=1"`
|
|
|
|
PerPage int64 `json:"per_page,optional,default=10"`
|
2023-09-15 09:58:45 +00:00
|
|
|
}
|