From adf24173c4efab319c01c4dd377cadaffe37d362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 4 Jul 2023 10:49:31 +0800 Subject: [PATCH 01/14] 1 --- platformapi/tao_vegetable/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/tao_vegetable/store_sku.go b/platformapi/tao_vegetable/store_sku.go index 83b955a7..c868a872 100644 --- a/platformapi/tao_vegetable/store_sku.go +++ b/platformapi/tao_vegetable/store_sku.go @@ -58,7 +58,7 @@ func (a *API) UpdateStoreSku(param *request.AlibabaWdkSkuUpdateRequest) (*[]Vege client := ability585.NewAbility585(&a.client) data, _ := client.AlibabaWdkSkuUpdate(param, a.token) - + globals.SugarLogger.Debugf("UpdateStoreSku := %s", utils.Format4Output(data, false)) if !*data.Result.Success { globals.SugarLogger.Debugf("requestId[%s],err[%s]", data.RequestId, utils.Format4Output(data.Result, false)) return nil, fmt.Errorf(*data.Result.ErrMsg) From 8b49da00f1652ca5355e99b1ab3575383d38860f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 4 Jul 2023 13:49:35 +0800 Subject: [PATCH 02/14] 1 --- platformapi/tao_vegetable/order_afs.go | 38 ++++++++++----------- platformapi/tao_vegetable/order_delivery.go | 8 ++--- platformapi/tao_vegetable/order_model.go | 18 ++++++++++ 3 files changed, 41 insertions(+), 23 deletions(-) diff --git a/platformapi/tao_vegetable/order_afs.go b/platformapi/tao_vegetable/order_afs.go index f514dd86..8935b66c 100644 --- a/platformapi/tao_vegetable/order_afs.go +++ b/platformapi/tao_vegetable/order_afs.go @@ -78,72 +78,72 @@ func (a *API) PartialRefund(req *request2.AlibabaTclsAelophyRefundCsapplyRequest } // UserApplyRefund 用户申请售后单消息通知 -func (a *API) UserApplyRefund(c *http.Request) (*UserApplyRefundCallBack, error) { +func (a *API) UserApplyRefund(c *http.Request) (*UserApplyRefundCallBack, string, error) { globals.SugarLogger.Debugf("进入 UserApplyRefund") data, err := ioutil.ReadAll(c.Body) if err != nil { - return nil, err + return nil, "", err } if len(data) == 0 { - return nil, err + return nil, "", err } var result *UserApplyRefundCallBack if err := json.Unmarshal(data, &result); err != nil { - return nil, err + return nil, "", err } - return result, nil + return result, string(data), nil } // UserCancelRefundApply 用户取消售后申请 -func (a *API) UserCancelRefundApply(c *http.Request) (*UserCancelRefundApply, error) { +func (a *API) UserCancelRefundApply(c *http.Request) (*UserCancelRefundApply, string, error) { globals.SugarLogger.Debugf("进入 UserCancelRefundApply") data, err := ioutil.ReadAll(c.Body) if err != nil { - return nil, err + return nil, "", err } if len(data) == 0 { - return nil, err + return nil, "", err } var result *UserCancelRefundApply if err := json.Unmarshal(data, &result); err != nil { - return nil, err + return nil, "", err } - return result, nil + return result, string(data), nil } // OnSaleRefundOrder 用户售中取消 -func (a *API) OnSaleRefundOrder(c *http.Request) (*OnSaleCancel, error) { +func (a *API) OnSaleRefundOrder(c *http.Request) (*OnSaleCancel, string, error) { globals.SugarLogger.Debugf("进入 OnSaleRefundOrder") body, _ := ioutil.ReadAll(c.Body) if len(body) == 0 { - return nil, nil + return nil, "", nil } var onSaleOrder *OnSaleCancel if err := json.Unmarshal(body, &onSaleOrder); err != nil { - return nil, err + return nil, "", err } - return onSaleOrder, nil + return onSaleOrder, "", nil } // RefundOrderFinish 同城零售逆向订单状态完成接口(退款完成) -func (a *API) RefundOrderFinish(c *http.Request) (*RefundOrderFinish, error) { +func (a *API) RefundOrderFinish(c *http.Request) (*RefundOrderFinish, string, error) { globals.SugarLogger.Debugf("进入 RefundOrderFinish") data, err := ioutil.ReadAll(c.Body) if err != nil { - return nil, err + return nil, "", err } if len(data) == 0 { - return nil, nil + return nil, "", nil } var result *RefundOrderFinish if err := json.Unmarshal(data, &result); err != nil { - return nil, err + return nil, "", err } - return result, nil + return result, "", nil } // QueryAfsOrderDetail 获取订单退款详情 diff --git a/platformapi/tao_vegetable/order_delivery.go b/platformapi/tao_vegetable/order_delivery.go index 9bbc48d1..c0488188 100644 --- a/platformapi/tao_vegetable/order_delivery.go +++ b/platformapi/tao_vegetable/order_delivery.go @@ -13,18 +13,18 @@ import ( ) // ReaderOrderInfo 获取订单状态回调 -func (a *API) ReaderOrderInfo(c *http.Request) (*CallbackOrder, error) { +func (a *API) ReaderOrderInfo(c *http.Request) (*CallbackOrder, string, error) { body, _ := ioutil.ReadAll(c.Body) if len(body) == 0 { - return nil, nil + return nil, "", nil } var callbackOrder *CallbackOrder if err := json.Unmarshal(body, &callbackOrder); err != nil { - return nil, err + return nil, "", err } - return callbackOrder, nil + return callbackOrder, string(body), nil } // QueryOrderDetail 自配送查询订单详情 diff --git a/platformapi/tao_vegetable/order_model.go b/platformapi/tao_vegetable/order_model.go index 4bfb56c9..f26eafcd 100644 --- a/platformapi/tao_vegetable/order_model.go +++ b/platformapi/tao_vegetable/order_model.go @@ -42,6 +42,24 @@ type CancelSubOrder struct { BizSubOrderId int64 `json:"bizSubOrderId"` // 要取消的子订单号 CancelStockQuantity string `json:"cancelStockQuantity"` // 库存单位取消数量 } +type T struct { + RefundFee int `json:"refundFee"` + MerchantCode string `json:"merchantCode"` + RefundReason string `json:"refundReason"` + BizRefundId string `json:"bizRefundId"` + OutOrderId string `json:"outOrderId"` + RefundPackageFee int `json:"refundPackageFee"` + OrderFrom int `json:"orderFrom"` + SubRefundOrders []struct { + RefundFee int `json:"refundFee"` + MaxRefundFee int `json:"maxRefundFee"` + OutSubOrderId string `json:"outSubOrderId"` + RefundAmount int `json:"refundAmount"` + } `json:"subRefundOrders"` + StoreId string `json:"storeId"` + RefundDeliveryFee int `json:"refundDeliveryFee"` + RefundId string `json:"refundId"` +} // UserApplyRefundCallBack 用户申请售后消息通知 type UserApplyRefundCallBack struct { From 2a93e775bbfdff666009aa202b1c13502486a422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 4 Jul 2023 14:16:11 +0800 Subject: [PATCH 03/14] 1 --- platformapi/tao_vegetable/order_afs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/tao_vegetable/order_afs.go b/platformapi/tao_vegetable/order_afs.go index 8935b66c..d34e899f 100644 --- a/platformapi/tao_vegetable/order_afs.go +++ b/platformapi/tao_vegetable/order_afs.go @@ -143,7 +143,7 @@ func (a *API) RefundOrderFinish(c *http.Request) (*RefundOrderFinish, string, er if err := json.Unmarshal(data, &result); err != nil { return nil, "", err } - return result, "", nil + return result, string(data), nil } // QueryAfsOrderDetail 获取订单退款详情 From 12edb0e4480bb25af3d8c5f434ee7f38bd81f1f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 4 Jul 2023 14:21:15 +0800 Subject: [PATCH 04/14] 1 --- platformapi/tao_vegetable/order_afs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/tao_vegetable/order_afs.go b/platformapi/tao_vegetable/order_afs.go index d34e899f..8476c93a 100644 --- a/platformapi/tao_vegetable/order_afs.go +++ b/platformapi/tao_vegetable/order_afs.go @@ -125,7 +125,7 @@ func (a *API) OnSaleRefundOrder(c *http.Request) (*OnSaleCancel, string, error) if err := json.Unmarshal(body, &onSaleOrder); err != nil { return nil, "", err } - return onSaleOrder, "", nil + return onSaleOrder, string(body), nil } // RefundOrderFinish 同城零售逆向订单状态完成接口(退款完成) From fba896a8e09823ac6a20ea5d9bbab86d1d4589e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 4 Jul 2023 15:24:03 +0800 Subject: [PATCH 05/14] 1 --- platformapi/dadaapi/order_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/dadaapi/order_test.go b/platformapi/dadaapi/order_test.go index d0c5df04..a92b8639 100644 --- a/platformapi/dadaapi/order_test.go +++ b/platformapi/dadaapi/order_test.go @@ -70,7 +70,7 @@ func TestCancel(t *testing.T) { // func TestQueryOrderInfo(t *testing.T) { dadaapi = New("dada154e2a41fd6cef3", "7f97d8f258b70b450f04e7ab274ed8f8", "6660", "http://callback.jxc4.com/dadadelivery/msg", true) - result, err := dadaapi.QueryOrderInfo("1100599580388710489") + result, err := dadaapi.QueryOrderInfo("1100618462495865287") if err != nil { t.Fatal(err) } From 4768f6f998f436b888e1866519f7950bcde95bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 4 Jul 2023 16:41:24 +0800 Subject: [PATCH 06/14] 1 --- platformapi/tao_vegetable/afs_test.go | 25 +++++++++++++++++++++++++ platformapi/tao_vegetable/order_afs.go | 4 ++-- platformapi/tao_vegetable/order_test.go | 17 +++++++++++++++-- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 platformapi/tao_vegetable/afs_test.go diff --git a/platformapi/tao_vegetable/afs_test.go b/platformapi/tao_vegetable/afs_test.go new file mode 100644 index 00000000..83ab013c --- /dev/null +++ b/platformapi/tao_vegetable/afs_test.go @@ -0,0 +1,25 @@ +package tao_vegetable + +import ( + domain2 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain" + request2 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/request" + "git.rosy.net.cn/baseapi/utils" + "git.rosy.net.cn/jx-callback/globals" + "testing" +) + +func TestAgreeUserCancel(t *testing.T) { + + param := &request2.AlibabaTclsAelophyRefundAgreeRequest{ + StoreId: utils.String2Pointer("JX668594"), + OutOrderId: utils.String2Pointer("3420907128196706112"), + RefundId: utils.String2Pointer("1000010804386340781"), + AuditMemo: utils.String2Pointer("商户同意退款"), + SubRefundList: &[]domain2.AlibabaTclsAelophyRefundAgreeSubrefundlist{ + {OutSubOrderId: utils.String2Pointer("3420907128196706112"), RefundFee: utils.Int64ToPointer(2700)}, + }, + OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)), + } + err := apiTao.AgreeUserCancel(param) + globals.SugarLogger.Debugf("%v", err) +} diff --git a/platformapi/tao_vegetable/order_afs.go b/platformapi/tao_vegetable/order_afs.go index 8476c93a..5da51c90 100644 --- a/platformapi/tao_vegetable/order_afs.go +++ b/platformapi/tao_vegetable/order_afs.go @@ -19,7 +19,7 @@ import ( // AgreeUserCancel 同意用户售后申请 func (a *API) AgreeUserCancel(req *request2.AlibabaTclsAelophyRefundAgreeRequest) error { - globals.SugarLogger.Debugf("进入AgreeUserCancel") + globals.SugarLogger.Debugf("进入AgreeUserCancel := %s", utils.Format4Output(req, false)) client := ability3156.NewAbility3156(&a.client) data, _ := client.AlibabaTclsAelophyRefundAgree(req, a.token) @@ -148,7 +148,7 @@ func (a *API) RefundOrderFinish(c *http.Request) (*RefundOrderFinish, string, er // QueryAfsOrderDetail 获取订单退款详情 func (a *API) QueryAfsOrderDetail(req *request591.AlibabaWdkOrderRefundGetRequest) (*domain591.AlibabaWdkOrderRefundGetOrderSyncRefundListResult, error) { - globals.SugarLogger.Debugf("进入 QueryAfsOrderDetail") + globals.SugarLogger.Debugf("进入 QueryAfsOrderDetail : %s", utils.Format4Output(req, false)) client := ability591.NewAbility591(&a.client) data, _ := client.AlibabaWdkOrderRefundGet(req, a.token) diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index c2e834dc..fad3a0be 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -17,13 +17,26 @@ func TestName(t *testing.T) { func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000894677248980922), + BizOrderId: utils.Int64ToPointer(5000894665550700922), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false)) } +func TestQueryAfsOrderDetail(t *testing.T) { + param := &request591.AlibabaWdkOrderRefundGetRequest{ + BizOrderIds: &[]int64{1924482145266804887}, + RefundIds: &[]int64{1000010803420790044}, + OrderFrom: utils.Int64ToPointer(31), + ShopId: nil, + StoreId: utils.String2Pointer("JX668594"), + } + data, err := apiTao.QueryAfsOrderDetail(param) + globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) + globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false)) +} + // 接单 func TestDeliveryFinishACCEPTED(t *testing.T) { param := &request591.AlibabaAelophyOrderWorkCallbackRequest{} @@ -57,7 +70,7 @@ func TestDeliveryFinishREJECTED(t *testing.T) { } func TestGetTransactionOrderList(t *testing.T) { - queryData := time.Now() + queryData := time.Now().AddDate(0, 0, 6) create := time.Date(queryData.Year(), queryData.Month(), queryData.Day(), 0, 0, 0, 0, queryData.Location()) end := time.Date(queryData.Year(), queryData.Month(), queryData.Day(), 23, 59, 59, 59, queryData.Location()) createTime := util.LocalTime(create) From d877a4e611ca7f3778ff3c08f63684ba876a61c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 5 Jul 2023 09:52:19 +0800 Subject: [PATCH 07/14] 1 --- platformapi/tao_vegetable/afs_test.go | 11 +++++++++++ platformapi/tao_vegetable/order_test.go | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/platformapi/tao_vegetable/afs_test.go b/platformapi/tao_vegetable/afs_test.go index 83ab013c..78843869 100644 --- a/platformapi/tao_vegetable/afs_test.go +++ b/platformapi/tao_vegetable/afs_test.go @@ -23,3 +23,14 @@ func TestAgreeUserCancel(t *testing.T) { err := apiTao.AgreeUserCancel(param) globals.SugarLogger.Debugf("%v", err) } + +func TestDiseAgreeCancel(t *testing.T) { + param := &request2.AlibabaTclsAelophyRefundDisagreeRequest{ + RefundId: utils.String2Pointer("1000010805204700044"), + RejectReason: utils.String2Pointer("就不给你退"), + OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)), + } + + err := apiTao.DisAgreeUserCancel(param) + globals.SugarLogger.Debugf("err := %v", err) +} diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index fad3a0be..aea37d40 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -17,7 +17,7 @@ func TestName(t *testing.T) { func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000894665550700922), + BizOrderId: utils.Int64ToPointer(5000897108900720922), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) @@ -61,7 +61,7 @@ func TestDeliveryFinishREJECTED(t *testing.T) { err := apiTao.DeliveryFinish(&request591.AlibabaAelophyOrderWorkCallbackRequest{ WorkCallbackRequest: &domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000894665550700922), + BizOrderId: utils.Int64ToPointer(5000897098078620922), Status: utils.String2Pointer("REJECTED"), }, }) From f21a8643781f819d79a0be4f0223eb15dbc05e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 5 Jul 2023 11:58:41 +0800 Subject: [PATCH 08/14] 1 --- platformapi/tao_vegetable/afs_test.go | 6 +++--- platformapi/tao_vegetable/order_delivery.go | 2 +- platformapi/tao_vegetable/order_test.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platformapi/tao_vegetable/afs_test.go b/platformapi/tao_vegetable/afs_test.go index 78843869..abde5942 100644 --- a/platformapi/tao_vegetable/afs_test.go +++ b/platformapi/tao_vegetable/afs_test.go @@ -12,11 +12,11 @@ func TestAgreeUserCancel(t *testing.T) { param := &request2.AlibabaTclsAelophyRefundAgreeRequest{ StoreId: utils.String2Pointer("JX668594"), - OutOrderId: utils.String2Pointer("3420907128196706112"), - RefundId: utils.String2Pointer("1000010804386340781"), + OutOrderId: utils.String2Pointer("1927395445205804887"), + RefundId: utils.String2Pointer("1000010811244310044"), AuditMemo: utils.String2Pointer("商户同意退款"), SubRefundList: &[]domain2.AlibabaTclsAelophyRefundAgreeSubrefundlist{ - {OutSubOrderId: utils.String2Pointer("3420907128196706112"), RefundFee: utils.Int64ToPointer(2700)}, + {OutSubOrderId: utils.String2Pointer("1927395445205804887"), RefundFee: utils.Int64ToPointer(300)}, }, OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)), } diff --git a/platformapi/tao_vegetable/order_delivery.go b/platformapi/tao_vegetable/order_delivery.go index c0488188..9167aed3 100644 --- a/platformapi/tao_vegetable/order_delivery.go +++ b/platformapi/tao_vegetable/order_delivery.go @@ -44,7 +44,7 @@ func (a *API) QueryOrderDetail(req *request2.AlibabaAelophyOrderGetRequest) (*do // DeliveryFinish 订单一下的没一个状态通知接口 // ACCEPTED = 商户接单 REJECTED = 商户取消订单 PICKED = 拣货完成 PACKAGED = 打包出库 SHIPPING = 开始配送 SIGN = 用户签收 REFUSED = 用户拒收 func (a *API) DeliveryFinish(req *request2.AlibabaAelophyOrderWorkCallbackRequest) error { - globals.SugarLogger.Debugf("进入 DeliveryFinish") + globals.SugarLogger.Debugf("进入 DeliveryFinish: %s", utils.Format4Output(req, false)) client := ability591.NewAbility591(&a.client) globals.SugarLogger.Debugf("param := %s", utils.Format4Output(req, false)) diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index aea37d40..a6545b60 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -17,7 +17,7 @@ func TestName(t *testing.T) { func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000897108900720922), + BizOrderId: utils.Int64ToPointer(5000897449678380922), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) @@ -116,13 +116,13 @@ func TestPickUp(t *testing.T) { param := &request591.AlibabaAelophyOrderWorkCallbackRequest{} param.WorkCallbackRequest = &domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000894677248980922), + BizOrderId: utils.Int64ToPointer(5000897449678380922), Status: utils.String2Pointer(OrderStatusPickedUp), } workCallbackSubOrderInfoList := make([]domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackSubOrderInfo, 0, 0) workCallbackSubOrderInfo := domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackSubOrderInfo{ - BizSubOrderId: utils.Int64ToPointer(5000894677248980922), + BizSubOrderId: utils.Int64ToPointer(3422286108419706112), SkuCode: utils.String2Pointer("19930827"), PickSaleQuantity: utils.String2Pointer("3"), PickStockQuantity: utils.String2Pointer("3"), From d7fc9b51a15a906b075ec0c864692d2cc9d0707e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 5 Jul 2023 14:04:40 +0800 Subject: [PATCH 09/14] 1 --- platformapi/tao_vegetable/afs_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformapi/tao_vegetable/afs_test.go b/platformapi/tao_vegetable/afs_test.go index abde5942..b1056f52 100644 --- a/platformapi/tao_vegetable/afs_test.go +++ b/platformapi/tao_vegetable/afs_test.go @@ -12,11 +12,11 @@ func TestAgreeUserCancel(t *testing.T) { param := &request2.AlibabaTclsAelophyRefundAgreeRequest{ StoreId: utils.String2Pointer("JX668594"), - OutOrderId: utils.String2Pointer("1927395445205804887"), - RefundId: utils.String2Pointer("1000010811244310044"), + OutOrderId: utils.String2Pointer("1927716386361804887"), + RefundId: utils.String2Pointer("1000010813678250044"), AuditMemo: utils.String2Pointer("商户同意退款"), SubRefundList: &[]domain2.AlibabaTclsAelophyRefundAgreeSubrefundlist{ - {OutSubOrderId: utils.String2Pointer("1927395445205804887"), RefundFee: utils.Int64ToPointer(300)}, + {OutSubOrderId: utils.String2Pointer("1927716386361804887"), RefundFee: utils.Int64ToPointer(300)}, }, OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)), } From 745b52d3c735f0a2d2f3c10ffffad3a3372331b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 5 Jul 2023 15:47:39 +0800 Subject: [PATCH 10/14] 1 --- platformapi/tao_vegetable/order_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index a6545b60..ed52318c 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -17,7 +17,7 @@ func TestName(t *testing.T) { func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000897449678380922), + BizOrderId: utils.Int64ToPointer(5000897506838100922), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) From 7b5365001da37c4012821bc523ed66ec23d57757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 5 Jul 2023 17:20:35 +0800 Subject: [PATCH 11/14] : --- platformapi/tao_vegetable/store_sku_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformapi/tao_vegetable/store_sku_test.go b/platformapi/tao_vegetable/store_sku_test.go index 5e54d230..16a5c9d4 100644 --- a/platformapi/tao_vegetable/store_sku_test.go +++ b/platformapi/tao_vegetable/store_sku_test.go @@ -196,9 +196,9 @@ func TestGetSkuDetaul(t *testing.T) { func TestPartialRefundReason(t *testing.T) { param := &request3156.AlibabaTclsAelophyRefundCsapplyrenderRequest{ RefundCsApplyRenderDTO: &domain3156.AlibabaTclsAelophyRefundCsapplyrenderRefundCsApplyRenderDto{ - OutOrderId: nil, + OutOrderId: utils.String2Pointer("5000897449678380922"), StoreId: utils.String2Pointer("JX668998"), - OutSubOrderIds: nil, + OutSubOrderIds: &[]string{"3422286108419706112"}, OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)), }, } From dc067d246f4f54de03ffb824e771d28209a8eab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 5 Jul 2023 18:11:37 +0800 Subject: [PATCH 12/14] 1 --- platformapi/tao_vegetable/order_afs.go | 2 +- platformapi/tao_vegetable/order_test.go | 16 +++++++++++++++- platformapi/tao_vegetable/store_sku_test.go | 14 -------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/platformapi/tao_vegetable/order_afs.go b/platformapi/tao_vegetable/order_afs.go index 5da51c90..012f8b6e 100644 --- a/platformapi/tao_vegetable/order_afs.go +++ b/platformapi/tao_vegetable/order_afs.go @@ -49,7 +49,7 @@ func (a *API) DisAgreeUserCancel(req *request2.AlibabaTclsAelophyRefundDisagreeR // PartialRefundReason 商户逆向取消订单数据渲染(获取订单商品列表已经取消原因:部分退款) func (a *API) PartialRefundReason(req *request2.AlibabaTclsAelophyRefundCsapplyrenderRequest) (*domain.AlibabaTclsAelophyRefundCsapplyrenderRefundCsApplyRenderResponseDto, error) { - globals.SugarLogger.Debugf("进入 PartialRefundReason") + globals.SugarLogger.Debugf("进入 PartialRefundReason: %s", utils.Format4Output(req, false)) client := ability3156.NewAbility3156(&a.client) data, _ := client.AlibabaTclsAelophyRefundCsapplyrender(req, a.token) diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index ed52318c..b3da0f8f 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -2,6 +2,8 @@ package tao_vegetable import ( "fmt" + domain3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain" + request3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/request" domain591 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/domain" request591 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/request" "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util" @@ -17,13 +19,25 @@ func TestName(t *testing.T) { func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000897506838100922), + BizOrderId: utils.Int64ToPointer(5000897608046720922), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false)) } +func TestPartialRefundReason(t *testing.T) { + param := &request3156.AlibabaTclsAelophyRefundCsapplyrenderRequest{ + RefundCsApplyRenderDTO: &domain3156.AlibabaTclsAelophyRefundCsapplyrenderRefundCsApplyRenderDto{ + OutOrderId: utils.String2Pointer("1927937966433804887"), + StoreId: utils.String2Pointer("JX668998"), + OutSubOrderIds: &[]string{"1927937966433804887"}, + OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)), + }, + } + apiTao.PartialRefundReason(param) +} + func TestQueryAfsOrderDetail(t *testing.T) { param := &request591.AlibabaWdkOrderRefundGetRequest{ BizOrderIds: &[]int64{1924482145266804887}, diff --git a/platformapi/tao_vegetable/store_sku_test.go b/platformapi/tao_vegetable/store_sku_test.go index 16a5c9d4..de584315 100644 --- a/platformapi/tao_vegetable/store_sku_test.go +++ b/platformapi/tao_vegetable/store_sku_test.go @@ -3,8 +3,6 @@ package tao_vegetable import ( "fmt" request1475 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability1475/request" - domain3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain" - request3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/request" domain585 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability585/domain" request585 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability585/request" domain587 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587/domain" @@ -193,18 +191,6 @@ func TestGetSkuDetaul(t *testing.T) { globals.SugarLogger.Debugf("result := %s ", utils.Format4Output(result, false)) } -func TestPartialRefundReason(t *testing.T) { - param := &request3156.AlibabaTclsAelophyRefundCsapplyrenderRequest{ - RefundCsApplyRenderDTO: &domain3156.AlibabaTclsAelophyRefundCsapplyrenderRefundCsApplyRenderDto{ - OutOrderId: utils.String2Pointer("5000897449678380922"), - StoreId: utils.String2Pointer("JX668998"), - OutSubOrderIds: &[]string{"3422286108419706112"}, - OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)), - }, - } - apiTao.PartialRefundReason(param) -} - func uploadImg(api *API, imgs []string) *string { result := make([]string, 0, 0) for _, v := range imgs { From 03628bf690286309e6b266a3a2cf537d55d6c6d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 6 Jul 2023 09:20:15 +0800 Subject: [PATCH 13/14] 1 --- platformapi/tao_vegetable/store_sku_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/tao_vegetable/store_sku_test.go b/platformapi/tao_vegetable/store_sku_test.go index de584315..860bb481 100644 --- a/platformapi/tao_vegetable/store_sku_test.go +++ b/platformapi/tao_vegetable/store_sku_test.go @@ -169,7 +169,7 @@ func TestStoreSkuStock(t *testing.T) { } stockPublishDtos := make([]domain589.AlibabaWdkStockPublishStockPublishDto, 0, 0) stockPublishDtos = append(stockPublishDtos, domain589.AlibabaWdkStockPublishStockPublishDto{ - SkuCode: utils.String2Pointer("19930827"), + SkuCode: utils.String2Pointer("22640"), Quantity: utils.String2Pointer("99"), OrderNo: utils.String2Pointer(fmt.Sprintf("%s_%d_%d", "JX668594", time.Now().UnixNano(), 84671)), OrderType: utils.String2Pointer("10006800"), From 4e48676681708c3531bb2962daad965d61dc2f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 6 Jul 2023 14:03:32 +0800 Subject: [PATCH 14/14] 1 --- platformapi/tao_vegetable/order_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index b3da0f8f..7c824cfe 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -19,7 +19,7 @@ func TestName(t *testing.T) { func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000897608046720922), + BizOrderId: utils.Int64ToPointer(5000897680290460922), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false))