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

Merge branch 'featrue/wandian'

...@@ -580,3 +580,70 @@ func (s *WangDianTong) LogisticsMultiQuery(ctx context.Context, req *LogisticsMu ...@@ -580,3 +580,70 @@ func (s *WangDianTong) LogisticsMultiQuery(ctx context.Context, req *LogisticsMu
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 *WangDianTong) LogisticsSyncQuery(ctx context.Context, req *LogisticsSyncQueryReq) (res *LogisticsSyncQueryRes, err error) {
result, err := s.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 *WangDianTong) LogisticsSyncAck(ctx context.Context, req []*LogisticsSyncAckReq) (res *LogisticsSyncAckRes, err error) {
result, err := s.post(ctx, "/openapi2/logistics_sync_ack.php", req)
if nil != err {
return
}
err = gjson.New(result).Scan(&res)
return
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论