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

Merge branch 'featrue/wandian'

...@@ -74,7 +74,8 @@ type TradePushRes struct { ...@@ -74,7 +74,8 @@ type TradePushRes struct {
ChgCount int `json:"chg_count"` ChgCount int `json:"chg_count"`
} }
/** /*
*
创建原始订单 创建原始订单
*/ */
func (s *order) TradePush(ctx context.Context, req *TradePushReq) (res *TradePushRes, err error) { func (s *order) TradePush(ctx context.Context, req *TradePushReq) (res *TradePushRes, err error) {
...@@ -246,7 +247,8 @@ type TradeQueryRes struct { ...@@ -246,7 +247,8 @@ type TradeQueryRes struct {
} `json:"stockout_list"` } `json:"stockout_list"`
} }
/** /*
*
查询销售出库单 查询销售出库单
*/ */
func (s *order) TradeQuery(ctx context.Context, req *TradeQueryReq) (res *TradeQueryRes, err error) { func (s *order) TradeQuery(ctx context.Context, req *TradeQueryReq) (res *TradeQueryRes, err error) {
...@@ -423,7 +425,8 @@ type SalesTradeQueryRes struct { ...@@ -423,7 +425,8 @@ type SalesTradeQueryRes struct {
} `json:"trades"` } `json:"trades"`
} }
/** /*
*
查询订单管理 查询订单管理
*/ */
func (s *order) SalesTradeQuery(ctx context.Context, req *SalesTradeQueryReq) (res *SalesTradeQueryRes, err error) { func (s *order) SalesTradeQuery(ctx context.Context, req *SalesTradeQueryReq) (res *SalesTradeQueryRes, err error) {
...@@ -526,7 +529,8 @@ type SalesApiTradeQueryRes struct { ...@@ -526,7 +529,8 @@ type SalesApiTradeQueryRes struct {
} `json:"trade_list"` } `json:"trade_list"`
} }
/** /*
*
查询原始订单 查询原始订单
*/ */
func (s *order) SalesApiTradeQuery(ctx context.Context, req *SalesApiTradeQueryReq) (res *SalesApiTradeQueryRes, err error) { func (s *order) SalesApiTradeQuery(ctx context.Context, req *SalesApiTradeQueryReq) (res *SalesApiTradeQueryRes, err error) {
...@@ -568,7 +572,8 @@ type LogisticsMultiQueryRes struct { ...@@ -568,7 +572,8 @@ type LogisticsMultiQueryRes struct {
} `json:"logistics_multi_list"` } `json:"logistics_multi_list"`
} }
/** /*
*
查询多物流单号 查询多物流单号
*/ */
func (s *order) LogisticsMultiQuery(ctx context.Context, req *LogisticsMultiQueryReq) (res *LogisticsMultiQueryRes, err error) { func (s *order) LogisticsMultiQuery(ctx context.Context, req *LogisticsMultiQueryReq) (res *LogisticsMultiQueryRes, err error) {
...@@ -580,3 +585,70 @@ func (s *order) LogisticsMultiQuery(ctx context.Context, req *LogisticsMultiQuer ...@@ -580,3 +585,70 @@ func (s *order) LogisticsMultiQuery(ctx context.Context, req *LogisticsMultiQuer
err = gjson.New(result).Scan(&res) err = gjson.New(result).Scan(&res)
return return
} }
type LogisticsSyncQueryReq struct {
Limit int `json:"limit"` // 获取条数 100
ShopNo string `json:"shop_no"` //店铺编号
}
type LogisticsSyncQueryRes 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) LogisticsSyncQuery(ctx context.Context, req *LogisticsSyncQueryReq) (res *LogisticsSyncQueryRes, err error) {
result, err := post(ctx, "/openapi2/logistics_sync_query.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
type LogisticsSyncAckReq struct {
RecId string `json:"rec_id"`
Status string `json:"status"`
Message string `json:"message"`
}
type LogisticsSyncAckRes struct {
Code int `json:"code"`
Message string `json:"message"`
Errors []struct {
RecId string `json:"rec_id"`
Error string `json:"error"`
} `json:"errors"`
}
/*
物流同步回写
*/
func (s *order) LogisticsSyncAck(ctx context.Context, req []*LogisticsSyncAckReq) (res *LogisticsSyncAckRes, err error) {
result, err := post(ctx, "/openapi2/logistics_sync_ack.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
...@@ -590,17 +590,17 @@ type LogisticsSyncQueryRes struct { ...@@ -590,17 +590,17 @@ type LogisticsSyncQueryRes struct {
Code int `json:"code"` Code int `json:"code"`
Message string `json:"message"` Message string `json:"message"`
Trades []struct { Trades []struct {
RecId string `json:"rec_id"` RecId int `json:"rec_id"`
ShopNo string `json:"shop_no"` ShopNo string `json:"shop_no"`
Tid string `json:"tid"` Tid string `json:"tid"`
LogisticsType string `json:"logistics_type"` LogisticsType int `json:"logistics_type"`
LogisticsNo string `json:"logistics_no"` LogisticsNo string `json:"logistics_no"`
DeliveryTerm string `json:"delivery_term"` DeliveryTerm int `json:"delivery_term"`
ConsignTime string `json:"consign_time"` ConsignTime string `json:"consign_time"`
Oids string `json:"oids"` Oids string `json:"oids"`
IsPartSync string `json:"is_part_sync"` IsPartSync string `json:"is_part_sync"`
PlatformId string `json:"platform_id"` PlatformId int `json:"platform_id"`
TradeId string `json:"trade_id"` TradeId int `json:"trade_id"`
LogisticsNameErp string `json:"logistics_name_erp"` LogisticsNameErp string `json:"logistics_name_erp"`
LogisticsCodeErp string `json:"logistics_code_erp"` LogisticsCodeErp string `json:"logistics_code_erp"`
LogisticsName string `json:"logistics_name"` LogisticsName string `json:"logistics_name"`
...@@ -621,8 +621,8 @@ func (s *WangDianTong) LogisticsSyncQuery(ctx context.Context, req *LogisticsSyn ...@@ -621,8 +621,8 @@ func (s *WangDianTong) LogisticsSyncQuery(ctx context.Context, req *LogisticsSyn
} }
type LogisticsSyncAckReq struct { type LogisticsSyncAckReq struct {
RecId string `json:"rec_id"` RecId int `json:"rec_id"`
Status string `json:"status"` Status int `json:"status"`
Message string `json:"message"` Message string `json:"message"`
} }
...@@ -630,7 +630,7 @@ type LogisticsSyncAckRes struct { ...@@ -630,7 +630,7 @@ type LogisticsSyncAckRes struct {
Code int `json:"code"` Code int `json:"code"`
Message string `json:"message"` Message string `json:"message"`
Errors []struct { Errors []struct {
RecId string `json:"rec_id"` RecId int `json:"rec_id"`
Error string `json:"error"` Error string `json:"error"`
} `json:"errors"` } `json:"errors"`
} }
......
...@@ -268,16 +268,18 @@ func (s *WangDianTong) StockRefundLogisticsQuery(ctx context.Context, req *Stock ...@@ -268,16 +268,18 @@ func (s *WangDianTong) StockRefundLogisticsQuery(ctx context.Context, req *Stock
} }
type StockinRefundPushReq struct { type StockinRefundPushReq struct {
RefundNo string `json:"refund_no"` RefundNo string `json:"refund_no"`
OuterNo string `json:"outer_no"` OuterNo string `json:"outer_no"`
WarehouseNo string `json:"warehouse_no"` WarehouseNo string `json:"warehouse_no"`
LogisticsCode string `json:"logistics_code"` LogisticsCode string `json:"logistics_code"`
DetailList []struct { DetailList []*StockinDetailList `json:"detail_list"`
SpecNo string `json:"spec_no"` }
StockinNum int `json:"stockin_num"`
BatchNo string `json:"batch_no"` type StockinDetailList struct {
StockinPrice float64 `json:"stockin_price"` SpecNo string `json:"spec_no"`
} `json:"detail_list"` StockinNum int `json:"stockin_num"`
BatchNo string `json:"batch_no"`
StockinPrice float64 `json:"stockin_price"`
} }
type StockinRefundPushRes struct { type StockinRefundPushRes struct {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论