1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package suning
import (
"context"
"encoding/json"
)
type AllAddressServiceReq struct {
SnRequest struct {
SnBody struct {
QueryAlladdressservice struct {
} `json:"queryAlladdressservice"`
} `json:"sn_body"`
} `json:"sn_request"`
}
type AllAddressServiceRes struct {
SnResponseContent struct {
SnBody struct {
QueryAlladdressservice struct {
AddressList []struct {
SecondPid string `json:"secondPid"`
SnId string `json:"snId"`
Level string `json:"level"`
Name string `json:"name"`
Pid string `json:"pid"`
Id string `json:"id"`
} `json:"addressList"`
} `json:"queryAlladdressservice"`
} `json:"sn_body"`
} `json:"sn_responseContent"`
}
// 确认收货
func AllAddressService(ctx context.Context) (res AllAddressServiceRes, err error) {
params := AllAddressServiceReq{}
result, err := post(ctx, "suning.sngoods.alladdressservice.query", params)
if nil != err {
return
}
err = json.Unmarshal([]byte(result), &res)
return
}