133 lines
4.0 KiB
Plaintext
133 lines
4.0 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "订单服务"// TODO: add title
|
|
desc: // TODO: add description
|
|
author: ""
|
|
email: ""
|
|
)
|
|
|
|
import "basic.api"
|
|
|
|
service orders {
|
|
//获取订单发票
|
|
@handler GetOrderInvoiceHandler
|
|
get /api/order/invoice (GetOrderInvoiceReq) returns (response);
|
|
//获取订单详情
|
|
@handler GetOrderDetailHandler
|
|
get /api/order/detail (GetOrderDetailReq) returns (response);
|
|
|
|
//获取订单列表
|
|
@handler GetUserOrderListHandler
|
|
get /api/user/order-list (GetUserOrderListReq) returns (response);
|
|
}
|
|
|
|
//获取订单发票
|
|
type GetOrderInvoiceReq {
|
|
Sn string `form:"sn"`
|
|
TimeZone int64 `form:"timeZone"`
|
|
}
|
|
type GetOrderInvoiceRsp {
|
|
FileName string `json:"file_name"`
|
|
Pdf string `json:"pdf"`
|
|
}
|
|
//获取订单详情
|
|
type GetOrderDetailReq {
|
|
Sn string `form:"sn"`
|
|
Size int64 `form:"size, optional"`
|
|
}
|
|
type GetOrderDetailRsp {
|
|
Id int64 `json:"id"`
|
|
TotalAmount int64 `json:"total_amount"`
|
|
Deposit int64 `json:"deposit"`
|
|
Remaining int64 `json:"remaining"`
|
|
IsPayCompleted int64 `json:"is_pay_completed"`
|
|
DeliveryMethod int64 `json:"delivery_method"`
|
|
Sn string `json:"sn"`
|
|
Status int64 `json:"status"`
|
|
Ctime string `json:"ctime"`
|
|
PayInfo *PayInfo `json:"pay_info"`
|
|
Address *Address `json:"address"`
|
|
ProductList []*Product `json:"productList"`
|
|
}
|
|
type Product {
|
|
Cover string `json:"cover"`
|
|
Fitting string `json:"fitting"`
|
|
OptionPrice int64 `json:"option_price"`
|
|
OrderDetailTemplateId int64 `json:"order_detail_template_id"`
|
|
OrderId int64 `json:"order_id"`
|
|
Pcs int64 `json:"pcs"`
|
|
PcsBox int64 `json:"pcs_box"`
|
|
Price int64 `json:"price"`
|
|
ProductId int64 `json:"product_id"`
|
|
Size string `json:"size"`
|
|
Title string `json:"title"`
|
|
}
|
|
type Address {
|
|
Id int64 `json:"id"`
|
|
UserId int64 `json:"user_id"`
|
|
Name string `json:"name"`
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name"`
|
|
Mobile string `json:"mobile"`
|
|
Street string `json:"street"`
|
|
Suite string `json:"suite"`
|
|
City string `json:"city"`
|
|
State string `json:"state"`
|
|
Country string `json:"country"`
|
|
ZipCode string `json:"zip_code"`
|
|
Status int64 `json:"status"`
|
|
IsDefault int64 `json:"is_default"`
|
|
}
|
|
type PayInfo {
|
|
Deposit Deposit `json:"Deposit"`
|
|
Final Deposit `json:"Final"`
|
|
}
|
|
type Deposit {
|
|
Method string `json:"method"`
|
|
TransNo string `json:"trans_no"`
|
|
}
|
|
|
|
// 获取订单列表
|
|
type (
|
|
GetUserOrderListReq {
|
|
Page int64 `form:"page"` // 分页
|
|
PageSize int64 `form:"page_size"` // 每页数量
|
|
Status int64 `form:"status"` // 状态筛选
|
|
Time int64 `form:"time"` // 时间筛选
|
|
Total int64 `form:"total"` // 总数
|
|
Size int64 `form:"size"` // 图片尺寸
|
|
}
|
|
|
|
GetUserOrderListRsp {
|
|
Items []Items `json:"items"`
|
|
Meta Meta `json:"_meta"`
|
|
}
|
|
)
|
|
|
|
type StatusTime {
|
|
Key int `json:"key"`
|
|
Time string `json:"time"`
|
|
}
|
|
|
|
type Items {
|
|
ID int64 `json:"id"`
|
|
Sn string `json:"sn"`
|
|
UserID int64 `json:"user_id"`
|
|
TotalAmount int64 `json:"total_amount"`
|
|
Ctime string `json:"ctime"`
|
|
Status int64 `json:"status"`
|
|
DeliveryMethod int64 `json:"delivery_method"`
|
|
TsTime string `json:"ts_time"`
|
|
IsPayCompleted int64 `json:"is_pay_completed"`
|
|
DeliverSn string `json:"deliver_sn"`
|
|
PcsBox int64 `json:"pcs_box"`
|
|
Pcs int64 `json:"pcs"`
|
|
SurplusAt int64 `json:"surplus_at"`
|
|
LogisticsStatus int64 `json:"logistics_status"`
|
|
StatusTimes []*StatusTime `json:"status_times"`
|
|
Deposit int64 `json:"deposit"`
|
|
Remaining int64 `json:"remaining"`
|
|
ProductList []*Product `json:"productList"`
|
|
IsStop int64 `json:"is_stop"`
|
|
} |