85 lines
2.4 KiB
Plaintext
85 lines
2.4 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);
|
|
}
|
|
|
|
//获取订单发票
|
|
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"`
|
|
} |