From ebe8aff95442bfa064d31c4f32d3d7cdad55afd8 Mon Sep 17 00:00:00 2001 From: zhongqiang <15375399426> Date: Wed, 18 Jun 2025 16:21:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=96=B0=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E9=93=BE-=E5=94=AF=E5=93=81=E5=B0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weipinshang_api/res.go | 8 ++++---- weipinshang_api/wei_pin_shang_client.go | 4 ++-- weipinshang_api/wei_pin_shang_client_test.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/weipinshang_api/res.go b/weipinshang_api/res.go index b876abc..1474151 100644 --- a/weipinshang_api/res.go +++ b/weipinshang_api/res.go @@ -33,10 +33,10 @@ type CreateOrderData struct { } type SkuData struct { - GoodSpecId string `json:"goodSpecId"` //商品ID(c_goods_id) - GoodsId string `json:"goodsId"` //商品ID(c_father_goods_id) - GoodName string `json:"goodName"` //商品名称 - Num string `json:"num"` //数量 + GoodSpecId string `json:"goodSpecId"` //商品ID(c_goods_id) + GoodsId string `json:"goodsId"` //商品ID(c_father_goods_id) + GoodName string `json:"goodName"` //商品名称 + Num interface{} `json:"num"` //数量 //Num int `json:"num"` //数量 Price string `json:"price"` //单价 } diff --git a/weipinshang_api/wei_pin_shang_client.go b/weipinshang_api/wei_pin_shang_client.go index e60cae2..12024d6 100644 --- a/weipinshang_api/wei_pin_shang_client.go +++ b/weipinshang_api/wei_pin_shang_client.go @@ -284,7 +284,7 @@ func (w *WeiPinShangClient) WPSPost(url string, paramMap map[string]any) (res [] //log.Printf("WPSPost client: %+v\n", client) // 发送请求 resp, err := client.Do(req) - log.Printf("WPSPost resp: %+v\n", resp) + //log.Printf("WPSPost resp: %+v\n", resp) if err != nil { log.Printf("发送请求失败: %+v\n", err) return @@ -299,7 +299,7 @@ func (w *WeiPinShangClient) WPSPost(url string, paramMap map[string]any) (res [] return } - //fmt.Printf("res: %s\n", string(res)) + fmt.Printf("res: %s\n", string(res)) if !json.Valid(res) { return nil, errors.New("响应体不是有效的JSON格式") diff --git a/weipinshang_api/wei_pin_shang_client_test.go b/weipinshang_api/wei_pin_shang_client_test.go index 9dac5e0..fc35ba0 100644 --- a/weipinshang_api/wei_pin_shang_client_test.go +++ b/weipinshang_api/wei_pin_shang_client_test.go @@ -87,7 +87,7 @@ func TestWeiPinShangClient_PreOrder(t *testing.T) { Area: "番禺区", ConsigneePhone: "15375390426", ConsigneeContacts: "张三", - LockCode: "L100000002", + LockCode: "L100000004", Source: "AILEHUI", }, }, @@ -135,8 +135,8 @@ func TestWeiPinShangClient_CreateOrder(t *testing.T) { Key: "f654ea5bde7635c3f46191191e5c4c8e", }, args: CreateOrderReq{ - LockCode: "L100000002", - OrderNo: "2000000001", + LockCode: "L100000004", + OrderNo: "2000000004", }, }, }