2023-05-31 03:38:17 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
2023-06-15 07:10:22 +00:00
|
|
|
title: "订单服务"// TODO: add title
|
2023-05-31 03:38:17 +00:00
|
|
|
desc: // TODO: add description
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
2023-06-21 08:39:55 +00:00
|
|
|
|
2023-06-15 07:10:22 +00:00
|
|
|
import "basic.api"
|
2023-06-21 08:39:55 +00:00
|
|
|
|
2023-06-15 07:10:22 +00:00
|
|
|
service orders {
|
|
|
|
//获取订单发票
|
|
|
|
@handler GetOrderInvoiceHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/order/invoice (GetOrderInvoiceReq) returns (response);
|
2023-06-16 06:28:59 +00:00
|
|
|
//获取订单详情
|
|
|
|
@handler GetOrderDetailHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/order/detail (GetOrderDetailReq) returns (response);
|
2023-07-20 06:43:59 +00:00
|
|
|
|
|
|
|
//获取订单列表
|
|
|
|
@handler GetUserOrderListHandler
|
|
|
|
get /api/user/order-list (GetUserOrderListReq) returns (response);
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|
|
|
|
|
2023-06-15 07:10:22 +00:00
|
|
|
//获取订单发票
|
|
|
|
type GetOrderInvoiceReq {
|
2023-06-15 11:14:19 +00:00
|
|
|
Sn string `form:"sn"`
|
|
|
|
TimeZone int64 `form:"timeZone"`
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|
2023-06-15 07:10:22 +00:00
|
|
|
type GetOrderInvoiceRsp {
|
|
|
|
FileName string `json:"file_name"`
|
2023-06-15 11:14:19 +00:00
|
|
|
Pdf string `json:"pdf"`
|
2023-06-16 06:28:59 +00:00
|
|
|
}
|
|
|
|
//获取订单详情
|
|
|
|
type GetOrderDetailReq {
|
2023-06-16 10:24:31 +00:00
|
|
|
Sn string `form:"sn"`
|
|
|
|
Size int64 `form:"size, optional"`
|
|
|
|
}
|
|
|
|
type GetOrderDetailRsp {
|
2023-06-20 10:37:56 +00:00
|
|
|
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"`
|
2023-06-16 10:24:31 +00:00
|
|
|
}
|
|
|
|
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"`
|
2023-07-20 06:43:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 获取订单列表
|
|
|
|
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"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2023-07-20 06:46:13 +00:00
|
|
|
type StatusTime {
|
2023-07-20 06:43:59 +00:00
|
|
|
Key int `json:"key"`
|
|
|
|
Time string `json:"time"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Items {
|
2023-07-20 06:46:13 +00:00
|
|
|
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"`
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|