对接新供应链-唯品尚

This commit is contained in:
zhongqiang
2025-05-28 11:57:30 +08:00
parent fa19e791e0
commit 79f36b239b
4 changed files with 91 additions and 22 deletions

View File

@@ -159,6 +159,53 @@ func TestWeiPinShangClient_CreateOrder(t *testing.T) {
}
}
func TestWeiPinShangClient_GetOrderInfo(t *testing.T) {
type fields struct {
Host string
ChannelType string
Key string
}
type args struct {
orderNo string
}
tests := []struct {
name string
fields fields
args args
wantRes *GetOrderInfoRes
wantErr bool
}{
{
name: "test1",
fields: fields{
Host: "https://uat.api.weipinshang.net/",
ChannelType: "AILEHUI",
Key: "f654ea5bde7635c3f46191191e5c4c8e",
},
args: args{
orderNo: "20250527172503439229",
},
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
h := &WeiPinShangClient{
Host: test.fields.Host,
ChannelType: test.fields.ChannelType,
Key: test.fields.Key,
}
gotRes, err := h.GetOrderInfo(test.args.orderNo)
log.Println(gotRes, err)
if (err != nil) != test.wantErr {
t.Errorf("GetManyPostage() error = %v, wantErr %v", err, test.wantErr)
}
})
}
}
func TestWeiPinShangClient_GetOrderInfoByItemNO(t *testing.T) {
type fields struct {
Host string
@@ -233,6 +280,17 @@ func TestWeiPinShangClient_GetOrderInfoByThirdNO(t *testing.T) {
orderNo: "10000000000",
},
},
{
name: "test1",
fields: fields{
Host: "https://uat.api.weipinshang.net/",
ChannelType: "AILEHUI",
Key: "f654ea5bde7635c3f46191191e5c4c8e",
},
args: args{
orderNo: "20250527172503439229",
},
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {