From 83ec115cbee522dd4f1fccacd6da2d6546e70783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 28 May 2020 17:18:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=95=86=E5=93=81=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdshopapi/jdshopapi.go | 2 ++ platformapi/jdshopapi/sku_test.go | 20 +++++++++---------- .../tonglianpayapi/tonglianpayapi_test.go | 10 ++++++++++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/platformapi/jdshopapi/jdshopapi.go b/platformapi/jdshopapi/jdshopapi.go index 780d4b62..669468ad 100644 --- a/platformapi/jdshopapi/jdshopapi.go +++ b/platformapi/jdshopapi/jdshopapi.go @@ -48,6 +48,8 @@ const ( JdsSkuStatus1032 = 1032 //在售 审核不通过 PassReason = "审核通过" + + JdsOtherMeatCatID = 15245 ) var ( diff --git a/platformapi/jdshopapi/sku_test.go b/platformapi/jdshopapi/sku_test.go index 3a228425..e63cdfd2 100644 --- a/platformapi/jdshopapi/sku_test.go +++ b/platformapi/jdshopapi/sku_test.go @@ -35,14 +35,6 @@ func TestDeleteShopCategory(t *testing.T) { t.Log(utils.Format4Output(result, false)) } -func TestFindVendorCategories(t *testing.T) { - result, err := api.FindVendorCategories() - if err != nil { - t.Fatal(err) - } - t.Log(utils.Format4Output(result, false)) -} - func TestUploadPicture(t *testing.T) { data, _, err := DownloadFileByURL("https://image.jxc4.com/noGoodsImg.jpg") // img, outMimeType, _ := Binary2Image(data, "") @@ -230,8 +222,16 @@ func TestCreateSku(t *testing.T) { t.Log(utils.Format4Output(result, false)) } +func TestFindVendorCategories(t *testing.T) { + result, err := api.FindVendorCategories() + if err != nil { + t.Fatal(err) + } + t.Log(utils.Format4Output(result, false)) +} + func TestFindAttrs(t *testing.T) { - result, err := api.FindAttrs(13571) + result, err := api.FindAttrs(15245) if err != nil { t.Fatal(err) } @@ -239,7 +239,7 @@ func TestFindAttrs(t *testing.T) { } func TestFindValuesByAttrId(t *testing.T) { - result, no, err := api.FindValuesByAttrId(102241) + result, no, err := api.FindValuesByAttrId(123060) if err != nil { t.Fatal(err) } diff --git a/platformapi/tonglianpayapi/tonglianpayapi_test.go b/platformapi/tonglianpayapi/tonglianpayapi_test.go index bf4129d3..d503026d 100644 --- a/platformapi/tonglianpayapi/tonglianpayapi_test.go +++ b/platformapi/tonglianpayapi/tonglianpayapi_test.go @@ -44,3 +44,13 @@ func TestCreateH5UnitorderOrder(t *testing.T) { Body: "test", }) } + +func TestPayRefund(t *testing.T) { + api.PayRefund(&PayRefundParam{ + Trxamt: 1250, + Reqsn: utils.GetUUID(), + // OldReqsn: orderPay.VendorOrderID, + Remark: "系统退款,商品数量错误", + OldTrxID: "122094350000087981", + }) +}