提交 cc1acf6b authored 作者: 屈传平's avatar 屈传平

wangdian

上级 81811f2c
...@@ -96,6 +96,7 @@ type GoodsListRes struct { ...@@ -96,6 +96,7 @@ type GoodsListRes struct {
ImgUrl string `json:"img_url"` ImgUrl string `json:"img_url"`
SpecAuxUnitName interface{} `json:"spec_aux_unit_name"` SpecAuxUnitName interface{} `json:"spec_aux_unit_name"`
SpecUnitName interface{} `json:"spec_unit_name"` SpecUnitName interface{} `json:"spec_unit_name"`
PlatSpecCount int `json:"plat_spec_count"`
} `json:"spec_list"` } `json:"spec_list"`
} `json:"goods_list"` } `json:"goods_list"`
} }
......
...@@ -260,18 +260,19 @@ func (s *order) TradeQuery(ctx context.Context, req *TradeQueryReq) (res *TradeQ ...@@ -260,18 +260,19 @@ func (s *order) TradeQuery(ctx context.Context, req *TradeQueryReq) (res *TradeQ
} }
type SalesTradeQueryReq struct { type SalesTradeQueryReq struct {
Status int `json:"status"` Status string `json:"status"`
StartTime string `json:"start_time"` StartTime string `json:"start_time"`
EndTime string `json:"end_time"` EndTime string `json:"end_time"`
PageSize int `json:"page_size"` PageSize int `json:"page_size"`
PageNo int `json:"page_no"` PageNo int `json:"page_no"`
ShopNo string `json:"shop_no"` //ShopNo string `json:"shop_no"`
WarehouseNo string `json:"warehouse_no"` //WarehouseNo string `json:"warehouse_no"`
Goodstax int `json:"goodstax"` //Goodstax int `json:"goodstax"`
HasLogisticsNo int `json:"has_logistics_no"` //HasLogisticsNo int `json:"has_logistics_no"`
IsFuzzy int `json:"is_fuzzy"` //IsFuzzy int `json:"is_fuzzy"`
Src int `json:"src"` //Src int `json:"src"`
ShopNos string `json:"shop_nos"` //ShopNos string `json:"shop_nos"`
SrcTid string `json:"src_tid"`
} }
type SalesTradeQueryRes struct { type SalesTradeQueryRes struct {
......
package wangdian
import (
"context"
"github.com/gogf/gf/encoding/gjson"
)
var OrderRefund = new(orderRefund)
type orderRefund struct {
}
type SalesRefundPushReq struct {
Tid string `json:"tid"`
ShopNo string `json:"shop_no"`
PlatformId int `json:"platform_id"`
RefundNo int `json:"refund_no"`
Type int `json:"type"`
Status string `json:"status"`
RefundFee float64 `json:"refund_fee"`
BuyerNick string `json:"buyer_nick"`
RefundTime string `json:"refund_time"`
Reason string `json:"reason"`
Desc string `json:"desc"`
RefundVersion string `json:"refund_version"`
OrderList []struct {
Oid string `json:"oid"`
Num int `json:"num"`
} `json:"order_list"`
}
type SalesRefundPushRes struct {
Code int `json:"code"`
Message string `json:"message"`
}
/**
创建原始退款单
*/
func (s *order) SalesRefundPush(ctx context.Context, req *SalesRefundPushReq) (res *SalesRefundPushRes, err error) {
result, err := post(ctx, "/openapi2/sales_refund_push.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
type RefundQueryReq struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
PageSize string `json:"page_size"`
PageNo string `json:"page_no"`
Tid string `json:"tid"`
LogisticsNo string `json:"logistics_no"`
SrcRefundNo string `json:"src_refund_no"`
RefundNo string `json:"refund_no"`
}
type RefundQueryRes struct {
Code int `json:"code"`
Message string `json:"message"`
TotalCount string `json:"total_count"`
Refunds []struct {
RefundId string `json:"refund_id"`
RefundNo string `json:"refund_no"`
Created string `json:"created"`
SrcNo string `json:"src_no"`
Type string `json:"type"`
ProcessStatus string `json:"process_status"`
SwapTradeId string `json:"swap_trade_id"`
Status string `json:"status"`
PayAccount string `json:"pay_account"`
PayNo string `json:"pay_no"`
GoodsAmount string `json:"goods_amount"`
RefundAmount string `json:"refund_amount"`
GuaranteeMode string `json:"guarantee_mode"`
CsStatus string `json:"cs_status"`
SalesTid string `json:"sales_tid"`
PostAmount string `json:"post_amount"`
OtherAmount string `json:"other_amount"`
Paid string `json:"paid"`
Tid string `json:"tid"`
SalesTradeId string `json:"sales_trade_id"`
BuyerNick string `json:"buyer_nick"`
ReceiverName string `json:"receiver_name"`
ReceiverAddress string `json:"receiver_address"`
ReceiverTelno string `json:"receiver_telno"`
ReturnName string `json:"return_name"`
ReturnMobile string `json:"return_mobile"`
ReturnTelno string `json:"return_telno"`
ExchangeAmount string `json:"exchange_amount"`
ReturnAddress string `json:"return_address"`
SwapReceiver string `json:"swap_receiver"`
SwapMobile string `json:"swap_mobile"`
SwapTelno string `json:"swap_telno"`
SwapProvince string `json:"swap_province"`
SwapCity string `json:"swap_city"`
SwapDistrict string `json:"swap_district"`
SwapArea string `json:"swap_area"`
SwapAddress string `json:"swap_address"`
RefundTime string `json:"refund_time"`
Remark string `json:"remark"`
Modified string `json:"modified"`
ActualRefundAmount string `json:"actual_refund_amount"`
GuaranteRefundAmount string `json:"guarante_refund_amount"`
OuterNo string `json:"outer_no"`
ReturnLogisticsName string `json:"return_logistics_name"`
ReturnLogisticsNo string `json:"return_logistics_no"`
DirectRefundAmount string `json:"direct_refund_amount"`
FinishTime string `json:"finish_time"`
ShopNo string `json:"shop_no"`
ShopName string `json:"shop_name"`
PlatformId string `json:"platform_id"`
ApiOuterNo string `json:"api_outer_no"`
CustomerNo string `json:"customer_no"`
CustomerName string `json:"customer_name"`
SwapZip interface{} `json:"swap_zip"`
SwapLogisticsType string `json:"swap_logistics_type"`
SwapLogisticsName string `json:"swap_logistics_name"`
WarehouseNo string `json:"warehouse_no"`
CreatorName string `json:"creator_name"`
SwapWarehouseNo string `json:"swap_warehouse_no"`
RefundReason string `json:"refund_reason"`
SwapTradeNo string `json:"swap_trade_no"`
RefundOrderList []struct {
OrderId string `json:"order_id"`
RefundId string `json:"refund_id"`
Oid string `json:"oid"`
Tid string `json:"tid"`
ProcessStatus string `json:"process_status"`
OrderNum string `json:"order_num"`
CostPrice string `json:"cost_price"`
Price string `json:"price"`
OriginalPrice string `json:"original_price"`
Discount string `json:"discount"`
Paid string `json:"paid"`
RefundNum string `json:"refund_num"`
TotalAmount string `json:"total_amount"`
RefundOrderAmount string `json:"refund_order_amount"`
SpecNo string `json:"spec_no"`
SpecId string `json:"spec_id"`
GoodsName string `json:"goods_name"`
SpecName string `json:"spec_name"`
SuiteNo string `json:"suite_no"`
SuiteName string `json:"suite_name"`
SuiteNum string `json:"suite_num"`
StockinNum string `json:"stockin_num"`
Remark string `json:"remark"`
MarketPrice string `json:"market_price"`
SpecCode string `json:"spec_code"`
IsSnEnable string `json:"is_sn_enable"`
GoodsNo string `json:"goods_no"`
SalesTid string `json:"sales_tid"`
} `json:"refund_order_list"`
} `json:"refunds"`
}
/**
查询退换管理
*/
func (s *order) RefundQuery(ctx context.Context, req *RefundQueryReq) (res *RefundQueryRes, err error) {
result, err := post(ctx, "/openapi2/refund_query.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
type StockRefundLogisticsQueryReq struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
PageSize string `json:"page_size"`
PageNo string `json:"page_no"`
LogisticsNo string `json:"logistics_no"`
}
type StockRefundLogisticsQueryRes struct {
Code int `json:"code"`
Message string `json:"message"`
Trades []struct {
RecId string `json:"rec_id"`
ShopNo string `json:"shop_no"`
Tid string `json:"tid"`
LogisticsType string `json:"logistics_type"`
LogisticsNo string `json:"logistics_no"`
DeliveryTerm string `json:"delivery_term"`
ConsignTime string `json:"consign_time"`
Oids string `json:"oids"`
IsPartSync string `json:"is_part_sync"`
PlatformId string `json:"platform_id"`
TradeId string `json:"trade_id"`
LogisticsNameErp string `json:"logistics_name_erp"`
LogisticsCodeErp string `json:"logistics_code_erp"`
LogisticsName string `json:"logistics_name"`
} `json:"trades"`
}
/**
查询退货物流单号
*/
func (s *order) StockRefundLogisticsQuery(ctx context.Context, req *StockRefundLogisticsQueryReq) (res *StockRefundLogisticsQueryRes, err error) {
result, err := post(ctx, "/openapi2/stock_refund_logistics_query.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
type StockinRefundPushReq struct {
RefundNo string `json:"refund_no"`
OuterNo string `json:"outer_no"`
WarehouseNo string `json:"warehouse_no"`
LogisticsCode string `json:"logistics_code"`
DetailList []struct {
SpecNo string `json:"spec_no"`
StockinNum int `json:"stockin_num"`
BatchNo string `json:"batch_no"`
StockinPrice float64 `json:"stockin_price"`
} `json:"detail_list"`
}
type StockinRefundPushRes struct {
Code int `json:"code"`
Message string `json:"message"`
}
/**
创建退货入库单
*/
func (s *order) StockinRefundPush(ctx context.Context, req *StockinRefundPushReq) (res *StockinRefundPushRes, err error) {
result, err := post(ctx, "/openapi2/stockin_refund_push.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
package wangdian
import (
"context"
"github.com/gogf/gf/encoding/gjson"
)
var Shop = new(shop)
type shop struct {
}
type ShopListReq struct {
IsDisabled string `json:"is_disabled"`
PlatformIds string `json:"platform_ids"`
ShopNo string `json:"shop_no"`
PlatformId string `json:"platform_id"`
PageSize int `json:"page_size"`
PageNo int `json:"page_no"`
}
type ShopListRes struct {
Code string `json:"code"`
TotalCount string `json:"total_count"`
Shoplist []struct {
PlatformId string `json:"platform_id"`
SubPlatformId string `json:"sub_platform_id"`
ShopId string `json:"shop_id"`
ShopNo string `json:"shop_no"`
ShopName string `json:"shop_name"`
AccountId string `json:"account_id"`
AccountNick string `json:"account_nick"`
Province string `json:"province"`
City string `json:"city"`
District string `json:"district"`
Address string `json:"address"`
Contact string `json:"contact"`
Zip string `json:"zip"`
Mobile string `json:"mobile"`
Telno string `json:"telno"`
Remark string `json:"remark"`
} `json:"shoplist"`
}
func (s *shop) ShopList(ctx context.Context, req *ShopListReq) (res *ShopListRes, err error) {
result, err := post(ctx, "/openapi2/shop.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论