- OrderDetailInfo -> RefundOrderDetailInfo

This commit is contained in:
gazebo
2019-06-11 18:40:03 +08:00
parent eb009df26d
commit bd6e0d482e

View File

@@ -101,30 +101,32 @@ type RefundSku struct {
Number string `json:"number"` Number string `json:"number"`
} }
type OrderDetailInfo struct { type ProductSubsidyInfo struct {
CustomSkuID string `json:"custom_sku_id"` AgentRate int `json:"agent_rate"`
Name string `json:"name"` BaiduRate int `json:"baidu_rate"`
Number int `json:"number"` Discount int `json:"discount"`
ProductFeatures []interface{} `json:"product_features"` DiscountDetail []*struct {
ProductFee int `json:"product_fee"` ActivityID string `json:"activity_id"`
ProductPrice int `json:"product_price"` BaiduRate int `json:"baidu_rate"`
ProductSubsidy struct { ShopRate int `json:"shop_rate"`
AgentRate int `json:"agent_rate"` Type string `json:"type"`
BaiduRate int `json:"baidu_rate"` } `json:"discount_detail"`
Discount int `json:"discount"` LogisticsRate int `json:"logistics_rate"`
DiscountDetail []*struct { ShopRate int `json:"shop_rate"`
ActivityID string `json:"activity_id"` UserRate int `json:"user_rate"`
BaiduRate int `json:"baidu_rate"` }
ShopRate int `json:"shop_rate"`
Type string `json:"type"` type RefundOrderDetailInfo struct {
} `json:"discount_detail"` CustomSkuID string `json:"custom_sku_id"`
LogisticsRate int `json:"logistics_rate"` Name string `json:"name"`
ShopRate int `json:"shop_rate"` Number int `json:"number"`
UserRate int `json:"user_rate"` ProductFeatures []interface{} `json:"product_features"`
} `json:"product_subsidy"` ProductFee int `json:"product_fee"`
SkuID string `json:"sku_id"` ProductPrice int `json:"product_price"`
TotalWeight int `json:"total_weight"` ProductSubsidy *ProductSubsidyInfo `json:"product_subsidy"`
Upc string `json:"upc"` SkuID string `json:"sku_id"`
TotalWeight int `json:"total_weight"`
Upc string `json:"upc"`
} }
type RefundDetailInfo struct { type RefundDetailInfo struct {
@@ -143,18 +145,18 @@ type RefundDetailInfo struct {
} }
type PartRefundInfo struct { type PartRefundInfo struct {
Commission int `json:"commission"` Commission int `json:"commission"`
Fee int `json:"fee"` Fee int `json:"fee"`
OrderDetail []*OrderDetailInfo `json:"order_detail"` OrderDetail []*RefundOrderDetailInfo `json:"order_detail"`
OrderID string `json:"order_id"` OrderID string `json:"order_id"`
PackageFee int `json:"package_fee"` PackageFee int `json:"package_fee"`
RefundDetail []*RefundDetailInfo `json:"refund_detail"` RefundDetail []*RefundDetailInfo `json:"refund_detail"`
RefundPrice int `json:"refund_price"` RefundPrice int `json:"refund_price"`
SendFee int `json:"send_fee"` SendFee int `json:"send_fee"`
ShopFee int `json:"shop_fee"` ShopFee int `json:"shop_fee"`
TotalPrice int `json:"total_price"` TotalPrice int `json:"total_price"`
Type int `json:"type"` Type int `json:"type"`
UserFee int `json:"user_fee"` UserFee int `json:"user_fee"`
} }
type ListOrderItemInfo struct { type ListOrderItemInfo struct {
@@ -360,7 +362,7 @@ func (a *API) OrderPartRefundGet(orderID string) (orderMap map[string]interface{
func (a *API) OrderPartRefundGet2(orderID string) (partRefundInfo *CBPartRefundInfo, err error) { func (a *API) OrderPartRefundGet2(orderID string) (partRefundInfo *CBPartRefundInfo, err error) {
result, err := a.OrderPartRefundGet(orderID) result, err := a.OrderPartRefundGet(orderID)
if err == nil { if err == nil {
err = utils.Map2StructByJson(result, &partRefundInfo, false) err = utils.Map2StructByJson(result, &partRefundInfo, true)
} }
return partRefundInfo, err return partRefundInfo, err
} }