fusenapi/server_api/order.api

42 lines
905 B
Plaintext
Raw Normal View History

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);
@handler CreatePrePaymentHandler
2023-09-20 03:39:56 +00:00
post /api/order/create-prepayment-balance(CreatePrePaymentReq) returns (response);
2023-09-15 09:58:45 +00:00
@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 {
}