From b535467e6ff9ef3f4032cd22abcb2fe15b0fc704 Mon Sep 17 00:00:00 2001 From: lzh <18320341470> Date: Wed, 28 May 2025 15:23:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=94=AF=E5=93=81=E5=B0=9A?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weipinshang/goods_api_test.go | 2 +- weipinshang/model.go | 8 ++++---- weipinshang/wei_pin_shang_client.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/weipinshang/goods_api_test.go b/weipinshang/goods_api_test.go index 401985a..5d56b6a 100644 --- a/weipinshang/goods_api_test.go +++ b/weipinshang/goods_api_test.go @@ -19,7 +19,7 @@ func setupMockServer(path string, method string, response string, t *testing.T) } func newClientWithServer(ts *httptest.Server) *wps.WeiPinShangClient { - return wps.NewWeiPinShangClient(wps.Config{ + return wps.NewWeiPinShangClient(wps.WpsConfig{ BaseURL: wps.DevHost, ChannelType: "AILEHUI", Key: "f654ea5bde7635c3f46191191e5c4c8e", diff --git a/weipinshang/model.go b/weipinshang/model.go index 0919591..bf9121c 100644 --- a/weipinshang/model.go +++ b/weipinshang/model.go @@ -112,10 +112,10 @@ type GetGoodsdeptRes struct { } type Goodsdept struct { - PageIndex string `json:"pageIndex"` - PageCount int `json:"pageCount"` - DataCount int `json:"dataCount"` - List []Goods `json:"list"` + PageIndex interface{} `json:"pageIndex"` + PageCount int `json:"pageCount"` + DataCount int `json:"dataCount"` + List []Goods `json:"list"` } // GetDetailsGoodsReq 获取批量商品详情接口 diff --git a/weipinshang/wei_pin_shang_client.go b/weipinshang/wei_pin_shang_client.go index 8632207..e92c917 100644 --- a/weipinshang/wei_pin_shang_client.go +++ b/weipinshang/wei_pin_shang_client.go @@ -32,7 +32,7 @@ const ( ) // Config 客户端配置 -type Config struct { +type WpsConfig struct { ChannelType string Key string BaseURL string @@ -48,7 +48,7 @@ type WeiPinShangClient struct { } // NewWeiPinShangClient 创建客户端 -func NewWeiPinShangClient(cfg Config) *WeiPinShangClient { +func NewWeiPinShangClient(cfg WpsConfig) *WeiPinShangClient { if cfg.ChannelType == "" { cfg.ChannelType = "AILEHUI" }