fusenapi/server_api/order.api

43 lines
945 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);
2023-09-20 07:07:12 +00:00
@handler CreatePrePaymentDepositHandler
post /api/order/create-prepayment-deposit(CreatePrePaymentDepositReq) returns (response);
2023-09-15 09:58:45 +00:00
@handler OrderListHandler
post /api/order/list(OrderListReq) returns (response);
}
2023-09-20 07:07:12 +00:00
type CreateOrderReq {
CartIds []int64 `json:"cart_ids"`
DeliveryMethod int64 `json:"delivery_method,options=[1,2]"`
2023-09-15 09:58:45 +00:00
}
2023-09-20 07:07:12 +00:00
type CreatePrePaymentDepositReq {
OrderSn string `json:"order_sn"`
DeliveryMethod int64 `json:"delivery_method"`
DeliveryAddres DeliveryAddres `json:"delivery_addres,optional"`
2023-09-15 09:58:45 +00:00
}
2023-09-20 07:07:12 +00:00
type DeliveryAddres {
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-20 07:07:12 +00:00
type OrderListReq {
2023-09-15 09:58:45 +00:00
}