提交 878ee907 authored 作者: 张立波's avatar 张立波

tmv3 OrderList

上级 9811d176
......@@ -12,10 +12,39 @@ type OrderListReq struct {
PageNumber int32
PageSize int32
OrderIdList []string
PurchaseOrderId string
}
type OrderListRes struct {
OrderList []struct {
OrderAmount int `json:"orderAmount"`
OrderLineList []struct {
ProductTitle string `json:"productTitle"`
Number string `json:"number"`
SkuTitle string `json:"skuTitle"`
ProductId string `json:"productId"`
OrderId string `json:"orderId"`
ProductPic string `json:"productPic"`
OrderLineId string `json:"orderLineId"`
LogisticsStatus string `json:"logisticsStatus"`
PayFee int `json:"payFee"`
SkuId string `json:"skuId"`
OrderLineStatus string `json:"orderLineStatus"`
} `json:"orderLineList"`
OrderId string `json:"orderId"`
DistributorId string `json:"distributorId"`
OrderStatus string `json:"orderStatus"`
LogisticsStatus string `json:"logisticsStatus"`
CreateDate string `json:"createDate"`
RequestId string `json:"requestId"`
OrderClosedReason string `json:"orderClosedReason"`
} `json:"orderList"`
RequestId string `json:"requestId"`
Total int `json:"total"`
}
// List 查询订单列表
func (s orderTm) List(ctx context.Context, req OrderListReq) (res *OrderDetailRes, err error) {
func (s orderTm) List(ctx context.Context, req OrderListReq) (res *OrderListRes, err error) {
Start := gtime.TimestampMilli()
ctx = context.WithValue(ctx, "URI", "QueryOrders")
defer func() {
......@@ -37,7 +66,13 @@ func (s orderTm) List(ctx context.Context, req OrderListReq) (res *OrderDetailRe
for _, item := range req.OrderIdList {
list = append(list, tea.String(item))
}
if req.PurchaseOrderId != "" {
Body.SetPurchaseOrderId(req.PurchaseOrderId)
}
if len(list) > 0 {
Body.SetOrderIdList(list)
}
Request.SetBody(Body)
r, err := server.QueryOrders(Request)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论