提交 412a4c4a authored 作者: 张立波's avatar 张立波

yunzmall OrderDetailV2

上级 e4219b38
......@@ -3,7 +3,6 @@ package yunzmall
import (
"context"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
......@@ -464,146 +463,3 @@ func (s *Client) OrderAvailable(ctx context.Context, req OrderAvailableReq) (res
err = gjson.New(result).Scan(&res)
return
}
type OrderDetailRes struct {
CommonRes
Data struct {
Read struct {
Id int `json:"id"`
CreatedAt int `json:"created_at"`
UpdatedAt int `json:"updated_at"`
OrderSn int64 `json:"order_sn"`
Status int `json:"status"` //0待支付 1待发货 2待收货 3已完成,-1已关闭 5退换货 6已退款
StatusName string `json:"status_name"`
Title string `json:"title"`
Freight int `json:"freight"`
Amount int `json:"amount"`
ItemAmount int `json:"item_amount"`
TechnicalServicesFee int `json:"technical_services_fee"`
Remark string `json:"remark"`
Note string `json:"note"`
GoodsCount int `json:"goods_count"`
UserId int `json:"user_id"`
ShippingAddressId int `json:"shipping_address_id"`
ShippingMethod string `json:"shipping_method"`
ShippingMethodId int `json:"shipping_method_id"`
CommentStatus int `json:"comment_status"`
OrderItems []struct {
Id int `json:"id"`
OrderId int `json:"order_id"`
Title string `json:"title"`
SkuTitle string `json:"sku_title"`
Unit string `json:"unit"`
Qty int `json:"qty"`
Amount int `json:"amount"`
Price int `json:"price"`
ImageUrl string `json:"image_url"`
ProductId int `json:"product_id"`
SupplyAmount int `json:"supply_amount"`
SkuId int `json:"sku_id"`
OrderExpressId int `json:"order_express_id"`
CommentStatus int `json:"comment_status"`
Options []struct {
SpecName string `json:"spec_name"`
SpecItemName string `json:"spec_item_name"`
} `json:"options"`
} `json:"order_items"`
OrderExpress []struct {
Id int `json:"id"`
ThirdOrderSn string `json:"third_order_sn"`
ExpressNo string `json:"express_no"`
CompanyCode string `json:"company_code"`
CompanyName string `json:"company_name"`
CreatedAt int `json:"created_at"`
OrderItems []struct {
Id int `json:"id"`
ImageUrl string `json:"image_url"`
ProductId int `json:"product_id"`
Title string `json:"title"`
SkuTitle string `json:"sku_title"`
SkuId int `json:"sku_id"`
Qty int `json:"qty"`
SendNum int `json:"send_num"`
SendStatus int `json:"send_status"`
SkuSn string `json:"sku_sn"`
} `json:"order_items"`
ItemExpress interface{} `json:"item_express"`
IsEmpty int `json:"is_empty"`
} `json:"order_express"`
ShippingAddress struct {
Id int `json:"id"`
Realname string `json:"realname"`
Mobile string `json:"mobile"`
CountryId int `json:"country_id"`
ProvinceId int `json:"province_id"`
CityId int `json:"city_id"`
CountyId int `json:"county_id"`
TownId int `json:"town_id"`
Province string `json:"province"`
City string `json:"city"`
County string `json:"county"`
Town string `json:"town"`
Detail string `json:"detail"`
Lng string `json:"lng"`
Lat string `json:"lat"`
} `json:"shipping_address"`
User struct {
Id int `json:"id"`
CreatedAt int `json:"created_at"`
UpdatedAt int `json:"updated_at"`
Mobile string `json:"mobile"`
Avatar string `json:"avatar"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Status int `json:"status"`
Uuid string `json:"uuid"`
LevelId int `json:"level_id"`
ParentId int `json:"parent_id"`
QrCode string `json:"qr_code"`
InviteCode string `json:"invite_code"`
WxUsername string `json:"wx_username"`
UserLevel struct {
Id int `json:"id"`
CreatedAt interface{} `json:"created_at"`
UpdatedAt interface{} `json:"updated_at"`
Discount int `json:"discount"`
Name string `json:"name"`
} `json:"user_level"`
} `json:"user"`
AmountDetail struct {
Title string `json:"title"`
Amount int `json:"amount"`
Qty int `json:"qty"`
Desc string `json:"desc"`
AmountItems []struct {
Title string `json:"title"`
Amount int `json:"amount"`
Qty int `json:"qty"`
Desc string `json:"desc"`
AmountItems interface{} `json:"amount_items"`
} `json:"amount_items"`
} `json:"amount_detail"`
PaidAt int `json:"paid_at"`
SentAt interface{} `json:"sent_at"`
ReceivedAt interface{} `json:"received_at"`
ClosedAt interface{} `json:"closed_at"`
Button []struct {
Title string `json:"title"`
Url string `json:"url"`
} `json:"button"`
} `json:"read"`
} `json:"data"`
}
// OrderDetail 订单详情
func (s *Client) OrderDetail(ctx context.Context, req string) (res *OrderDetailRes, err error) {
var method = "/app/order/orderDetail"
result, err := s.get(ctx, method, g.Map{
"order_sn": req,
})
if err != nil {
return
}
err = gjson.New(result).Scan(&res)
return
}
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论