waybilljd

This commit is contained in:
苏尹岚
2020-11-05 15:26:37 +08:00
parent 22f4573876
commit 5cdd58c5dc

View File

@@ -417,7 +417,11 @@ func (a *API) QueryStock(goodsNo string) (queryStockResult []*QueryStockResult,
func (a *API) WaybillReceive(waybillReceiveParam *WaybillReceiveParam) (deliveryId string, err error) {
result, err := a.AccessAPI("jingdong.ldop.waybill.receive", prodURL, utils.Struct2FlatMap(waybillReceiveParam))
if err == nil {
deliveryId = result["jingdong_ldop_waybill_receive_responce"].(map[string]interface{})["receiveorderinfo_result"].(map[string]interface{})["deliveryId"].(string)
if utils.MustInterface2Int64(result["jingdong_ldop_waybill_receive_responce"].(map[string]interface{})["receiveorderinfo_result"].(map[string]interface{})["resultCode"]) != 0 {
return deliveryId, fmt.Errorf(result["jingdong_ldop_waybill_receive_responce"].(map[string]interface{})["receiveorderinfo_result"].(map[string]interface{})["resultMessage"].(string))
} else {
deliveryId = result["jingdong_ldop_waybill_receive_responce"].(map[string]interface{})["receiveorderinfo_result"].(map[string]interface{})["deliveryId"].(string)
}
}
return deliveryId, err
}