对接新供应链-唯品尚

This commit is contained in:
zhongqiang 2025-06-18 16:21:45 +08:00
parent 12e627aac6
commit ebe8aff954
3 changed files with 9 additions and 9 deletions

View File

@ -33,10 +33,10 @@ type CreateOrderData struct {
} }
type SkuData struct { type SkuData struct {
GoodSpecId string `json:"goodSpecId"` //商品ID(c_goods_id) GoodSpecId string `json:"goodSpecId"` //商品ID(c_goods_id)
GoodsId string `json:"goodsId"` //商品ID(c_father_goods_id) GoodsId string `json:"goodsId"` //商品ID(c_father_goods_id)
GoodName string `json:"goodName"` //商品名称 GoodName string `json:"goodName"` //商品名称
Num string `json:"num"` //数量 Num interface{} `json:"num"` //数量
//Num int `json:"num"` //数量 //Num int `json:"num"` //数量
Price string `json:"price"` //单价 Price string `json:"price"` //单价
} }

View File

@ -284,7 +284,7 @@ func (w *WeiPinShangClient) WPSPost(url string, paramMap map[string]any) (res []
//log.Printf("WPSPost client: %+v\n", client) //log.Printf("WPSPost client: %+v\n", client)
// 发送请求 // 发送请求
resp, err := client.Do(req) resp, err := client.Do(req)
log.Printf("WPSPost resp: %+v\n", resp) //log.Printf("WPSPost resp: %+v\n", resp)
if err != nil { if err != nil {
log.Printf("发送请求失败: %+v\n", err) log.Printf("发送请求失败: %+v\n", err)
return return
@ -299,7 +299,7 @@ func (w *WeiPinShangClient) WPSPost(url string, paramMap map[string]any) (res []
return return
} }
//fmt.Printf("res: %s\n", string(res)) fmt.Printf("res: %s\n", string(res))
if !json.Valid(res) { if !json.Valid(res) {
return nil, errors.New("响应体不是有效的JSON格式") return nil, errors.New("响应体不是有效的JSON格式")

View File

@ -87,7 +87,7 @@ func TestWeiPinShangClient_PreOrder(t *testing.T) {
Area: "番禺区", Area: "番禺区",
ConsigneePhone: "15375390426", ConsigneePhone: "15375390426",
ConsigneeContacts: "张三", ConsigneeContacts: "张三",
LockCode: "L100000002", LockCode: "L100000004",
Source: "AILEHUI", Source: "AILEHUI",
}, },
}, },
@ -135,8 +135,8 @@ func TestWeiPinShangClient_CreateOrder(t *testing.T) {
Key: "f654ea5bde7635c3f46191191e5c4c8e", Key: "f654ea5bde7635c3f46191191e5c4c8e",
}, },
args: CreateOrderReq{ args: CreateOrderReq{
LockCode: "L100000002", LockCode: "L100000004",
OrderNo: "2000000001", OrderNo: "2000000004",
}, },
}, },
} }