From ee9ac0e8da050331573ed5fb0f34b99ce54f3d46 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 1 Sep 2022 18:00:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/supply/order.go b/supply/order.go index 74181ae..b02ab6e 100644 --- a/supply/order.go +++ b/supply/order.go @@ -35,3 +35,14 @@ func (o *order) Split(ctx context.Context, args ArgsOrderSplit) (err error) { err = xClient.Call(ctx, "Lists", args, &reply) return } + +// Cancel @Title 订单取消 +func (o *order) Cancel(ctx context.Context, orderSubSn string) (err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Cancel", orderSubSn, &reply) + return +} From 127c4635b4e9f857deca1d8c25f89427b53a9e42 Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 2 Sep 2022 09:18:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/supply/order.go b/supply/order.go index b02ab6e..3684ff0 100644 --- a/supply/order.go +++ b/supply/order.go @@ -36,13 +36,18 @@ func (o *order) Split(ctx context.Context, args ArgsOrderSplit) (err error) { return } +type ArgsOrderCancel struct { + Source source // 商品来源 + SourceOrderSn string // 供应商订单号 +} + // Cancel @Title 订单取消 -func (o *order) Cancel(ctx context.Context, orderSubSn string) (err error) { +func (o *order) Cancel(ctx context.Context, args ArgsOrderCancel) (err error) { xClient, err := client.GetClient(o) if err != nil { return } reply := 0 - err = xClient.Call(ctx, "Cancel", orderSubSn, &reply) + err = xClient.Call(ctx, "Cancel", args, &reply) return }