From fa887acb2004e0239551090fe5285f8b2fa17d61 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 6 Sep 2022 10:18:50 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/category.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/supply/category.go b/supply/category.go index 0795cfc..b16decf 100644 --- a/supply/category.go +++ b/supply/category.go @@ -75,3 +75,14 @@ func (c *category) FindByIds(ctx context.Context, args ArgsCategoryFindByIds) (r err = xClient.Call(ctx, "FindByIds", args, &result) return } + +// GetThreeLevelAll @Title 获取全部三级分类 +func (c *category) GetThreeLevelAll(ctx context.Context) (result []ThirdCategoryItem, err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + args := 0 + err = xClient.Call(ctx, "GetThreeLevelAll", args, &result) + return +} From 95309c67de1f6bc7a7cd72ea5d3537e06c1c359a Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 6 Sep 2022 11:02:19 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/category.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/supply/category.go b/supply/category.go index b16decf..0795cfc 100644 --- a/supply/category.go +++ b/supply/category.go @@ -75,14 +75,3 @@ func (c *category) FindByIds(ctx context.Context, args ArgsCategoryFindByIds) (r err = xClient.Call(ctx, "FindByIds", args, &result) return } - -// GetThreeLevelAll @Title 获取全部三级分类 -func (c *category) GetThreeLevelAll(ctx context.Context) (result []ThirdCategoryItem, err error) { - xClient, err := client.GetClient(c) - if err != nil { - return - } - args := 0 - err = xClient.Call(ctx, "GetThreeLevelAll", args, &result) - return -} From 2f80979f915288ca059750a8dc7c3c9156d23d6e Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 6 Sep 2022 16:44:54 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/sku.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/supply/sku.go b/supply/sku.go index f09bdab..3869e0b 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -52,6 +52,8 @@ type ArgsSkuAdd struct { Size string // 尺码 Color string // 颜色 Tax string // 税率 + TaxName string // 税收名称 + TaxCode string // 税收编码 Unit string // 销售单位 UpcCode string // 商品条码 Source source // 商品来源 From 290a36263ea6c4ab58c75a3bee1aff0cfdb9f86d Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 6 Sep 2022 18:14:38 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/supply/order.go b/supply/order.go index 3684ff0..aeed211 100644 --- a/supply/order.go +++ b/supply/order.go @@ -6,6 +6,12 @@ import ( "github.com/shopspring/decimal" ) +const ( + OrderCancelStatusSuccess = 1 // 取消成功 + OrderCancelStatusFail = 2 // 取消失败 + OrderCancelStatusReject = 3 // 申请拒收 +) + type order struct { } type ArgsOrderSplit struct { @@ -39,6 +45,7 @@ func (o *order) Split(ctx context.Context, args ArgsOrderSplit) (err error) { type ArgsOrderCancel struct { Source source // 商品来源 SourceOrderSn string // 供应商订单号 + Status uint // 订单取消 } // Cancel @Title 订单取消 From bb99e20c0fc4e8e3f689d04e6f0c5edab0253463 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 7 Sep 2022 10:26:30 +0800 Subject: [PATCH 5/8] =?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 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/supply/order.go b/supply/order.go index aeed211..7979455 100644 --- a/supply/order.go +++ b/supply/order.go @@ -58,3 +58,26 @@ func (o *order) Cancel(ctx context.Context, args ArgsOrderCancel) (err error) { err = xClient.Call(ctx, "Cancel", args, &reply) return } + +type ArgsOrderStockOut struct { + Source source // 商品来源 + SourceOrderSn string // 供应商订单号 + Packages []Package // 包裹运单 +} + +type Package struct { + LogisticsCode string // 物流编码 + LogisticsName string // 物流名称 + WaybillCode string // 运单号 +} + +// StockOut @Title 出库发货 +func (o *order) StockOut(ctx context.Context, args ArgsOrderCancel) (err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Cancel", args, &reply) + return +} From d37e48ee5a47d7f5738bee1a42e22844e8bf3271 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 7 Sep 2022 10:34:01 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supply/order.go b/supply/order.go index 7979455..0166ff0 100644 --- a/supply/order.go +++ b/supply/order.go @@ -72,7 +72,7 @@ type Package struct { } // StockOut @Title 出库发货 -func (o *order) StockOut(ctx context.Context, args ArgsOrderCancel) (err error) { +func (o *order) StockOut(ctx context.Context, args ArgsOrderStockOut) (err error) { xClient, err := client.GetClient(o) if err != nil { return From 2915389e0ce09cf4c8837422b9734d4837cc7416 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 7 Sep 2022 10:35:04 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supply/order.go b/supply/order.go index 0166ff0..02bca3a 100644 --- a/supply/order.go +++ b/supply/order.go @@ -78,6 +78,6 @@ func (o *order) StockOut(ctx context.Context, args ArgsOrderStockOut) (err error return } reply := 0 - err = xClient.Call(ctx, "Cancel", args, &reply) + err = xClient.Call(ctx, "StockOut", args, &reply) return } From 23a63162fd39ea4c96969c69f5bed4a920d81758 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 7 Sep 2022 10:58:39 +0800 Subject: [PATCH 8/8] =?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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/supply/order.go b/supply/order.go index 02bca3a..ce5585e 100644 --- a/supply/order.go +++ b/supply/order.go @@ -81,3 +81,19 @@ func (o *order) StockOut(ctx context.Context, args ArgsOrderStockOut) (err error err = xClient.Call(ctx, "StockOut", args, &reply) return } + +type ArgsOrderFinish struct { + Source source // 商品来源 + SourceOrderSn string // 供应商订单号 +} + +// Finish @Title 订单完成 +func (o *order) Finish(ctx context.Context, args ArgsOrderFinish) (err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Finish", args, &reply) + return +}