From ed24e8e777b668088ea59ae9790a4174ecdafe9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 26 Sep 2024 09:18:43 +0800 Subject: [PATCH] 1 --- platformapi/feieapi/feieapi_test.go | 4 ++-- platformapi/jdapi/jdapi_test.go | 4 ++-- platformapi/jdapi/order.go | 24 +++++++++++++----------- platformapi/jdapi/order_test.go | 4 ++-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/platformapi/feieapi/feieapi_test.go b/platformapi/feieapi/feieapi_test.go index 39d1d184..62923246 100644 --- a/platformapi/feieapi/feieapi_test.go +++ b/platformapi/feieapi/feieapi_test.go @@ -60,7 +60,7 @@ func TestPrinterDelList(t *testing.T) { } func TestQueryOrderInfoByDate(t *testing.T) { - printed, waiting, err := api.QueryOrderInfoByDate("922591501", time.Now()) + printed, waiting, err := api.QueryOrderInfoByDate("525553025", time.Now()) if err != nil { t.Fatalf("QueryOrderInfoByDate return error:%v", err) } @@ -75,7 +75,7 @@ func TestDelPrinterSqs(t *testing.T) { } func TestQueryPrinterStatus(t *testing.T) { - status, err := api.QueryPrinterStatus("922591501") + status, err := api.QueryPrinterStatus("525553025") if err != nil { t.Fatalf("QueryPrinterStatus return error:%v", err) } diff --git a/platformapi/jdapi/jdapi_test.go b/platformapi/jdapi/jdapi_test.go index d66d442d..97f00d67 100644 --- a/platformapi/jdapi/jdapi_test.go +++ b/platformapi/jdapi/jdapi_test.go @@ -30,11 +30,11 @@ func init() { // 天天果园 //api = New("c45e6510-00ba-4be2-977e-bcb9c9792cc7", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26") // 京东果园 320406 - //api = New("1e87595b-e850-4ba4-9ee0-53bcfe383a4f", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4") + api = New("1e87595b-e850-4ba4-9ee0-53bcfe383a4f", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4") // 果切 379599 //api = New("ad4061a1-6a5c-43f9-bf51-b1232fd9499d", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec") // 381564 - api = New("8d9e4443-3536-41ae-b6c7-677f90f1978b", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da") + //api = New("8d9e4443-3536-41ae-b6c7-677f90f1978b", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da") // 384633 ///api = New("02a3f772-89f3-46f1-bbd5-74be346cba54", "e496a0f9b88a407297fea283b8dc9e29", "9bb82ffbec144c4b8fc8d627e5ca6a35") diff --git a/platformapi/jdapi/order.go b/platformapi/jdapi/order.go index 3a462c68..1f7bf793 100644 --- a/platformapi/jdapi/order.go +++ b/platformapi/jdapi/order.go @@ -2,6 +2,7 @@ package jdapi import ( "errors" + "fmt" "git.rosy.net.cn/jx-callback/globals" "strings" @@ -662,17 +663,18 @@ func (a *API) ConfirmReceiveGoods(orderId string) (err error) { // 自配送商家(或转自配送)的订单,由于无法完成订单配送,通过此接口取消订单并退款。 // https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=169&apiid=6be3f3a811f14f22a83007ab02f23b03 func (a *API) CancelAndRefund(orderId, operPin, operRemark string) (err error) { - if operRemark == "" { - operRemark = "operRemark" - } - jdParams := map[string]interface{}{ - "orderId": orderId, - "operPin": utils.GetAPIOperator(operPin), - "operRemark": operRemark, - "operTime": utils.GetCurTimeStr(), - } - _, err = a.AccessAPINoPage("orderStatus/cancelAndRefund", jdParams, nil, nil, genNoPageResultParser("code", "detail", "", "0")) - return err + return fmt.Errorf("京东商家取消接口已下线,请APP联系客服或拨打客服热线:400 002 0020 取消订单") + //if operRemark == "" { + // operRemark = "operRemark" + //} + //jdParams := map[string]interface{}{ + // "orderId": orderId, + // "operPin": utils.GetAPIOperator(operPin), + // "operRemark": operRemark, + // "operTime": utils.GetCurTimeStr(), + //} + //_, err = a.AccessAPINoPage("orderStatus/cancelAndRefund", jdParams, nil, nil, genNoPageResultParser("code", "detail", "", "0")) + //return err } // 申请售后单审核接口 diff --git a/platformapi/jdapi/order_test.go b/platformapi/jdapi/order_test.go index dc1f9026..6b33ccf4 100644 --- a/platformapi/jdapi/order_test.go +++ b/platformapi/jdapi/order_test.go @@ -32,7 +32,7 @@ func TestPickUp(t *testing.T) { func TestOrderQuery(t *testing.T) { jdParams := map[string]interface{}{ - "orderId": "2408169643015823", + "orderId": "2423124647018693", } result, totalCount, err := api.OrderQuery(jdParams) if err != nil { @@ -198,7 +198,7 @@ func TestProcessQuestionPic(t *testing.T) { } func TestCancelAndRefund(t *testing.T) { - err := api.CancelAndRefund("2421334508000321", "jxadmin", "协商一致") + err := api.CancelAndRefund("2423124647018693", "jxadmin", "协商一致") if err != nil { t.Fatal(err.Error()) }