This commit is contained in:
邹宗楠
2026-01-21 14:14:26 +08:00
parent abaf8aa75e
commit ab96fc6343
11 changed files with 147 additions and 31 deletions

View File

@@ -845,3 +845,18 @@ type CommonAttrValueList struct {
} `json:"valueListIterator"`
ValueListSize int `json:"valueListSize"`
}
// GetOrderAddress 获取美团订单加密地址
// https://tscc.meituan.com/home/doc/market/10619
func (a *API) GetOrderAddress(orderId int64, reasonType int) (address string, err error) {
result, err := a.AccessAPI2("ecommerce/order/getOrderRecipientAddress", true, map[string]interface{}{
"order_id": orderId,
"reason_type": reasonType,
}, "success_map", "")
if err != nil {
return "", err
}
return result.(map[string]interface{})["recipient_address"].(string), nil
}

View File

@@ -31,7 +31,7 @@ func getTimeFromTimestamp(timeStamp int64) time.Time {
}
func TestOrderGetOrderDetail(t *testing.T) {
result, err := api.OrderGetOrderDetail(4001715692418465050, false)
result, err := api.OrderGetOrderDetail(301957391218748322, false)
if err != nil {
t.Fatal(err)
}
@@ -461,3 +461,9 @@ func BatchInitSkuMT2MT(fromSku []*AppFood, toApi *API, vendorStoreID string, off
return errList, nil
}
func TestGetOrderAddress(t *testing.T) {
address, err := api.GetOrderAddress(301957513500953108, 3)
fmt.Println(address)
fmt.Println(err)
}