From dd10194a0461ad52eb2146541600afa7ffe53e46 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 11 Aug 2022 14:22:15 +0800 Subject: [PATCH 1/6] =?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/channel/order.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/supply/channel/order.go b/supply/channel/order.go index c2f2300..db2609e 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -47,12 +47,13 @@ type SkuOrderItem struct { Quantity uint // 数量 } type ArgsOrderSubmit struct { - Address string // 地址 - Skus []SkuOrderItem // sku信息 - Receiver Receiver // 收件信息 - OrderFee decimal.Decimal // 订单金额-不含运费 - FreightFees []OrderFreightFee // 运费 - UserIp string // 下单用户ip + ChannelOrderSn string // 渠道订单编号 + Address string // 地址 + Skus []SkuOrderItem // sku信息 + Receiver Receiver // 收件信息 + OrderFee decimal.Decimal // 订单金额-不含运费 + FreightFees []OrderFreightFee // 运费 + UserIp string // 下单用户ip } type OrderFreightFee struct { @@ -68,6 +69,8 @@ type Receiver struct { } type ReplyOrderSubmit struct { + OrderSn string + ChannelOrderSn string } // Submit @Title 下单 From ffd52da52d1a235cda6573ce7b7f7fa26b267a4e Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 11 Aug 2022 14:22:28 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/brand.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/supply/brand.go b/supply/brand.go index d4516ff..150824c 100644 --- a/supply/brand.go +++ b/supply/brand.go @@ -91,3 +91,13 @@ func (b *brand) FindByIds(ctx context.Context, args ArgsBrandFindByIds) (result err = xClient.Call(ctx, "FindByIds", args, &result) return } + +// Export @Title 导出品牌 +func (b *brand) Export(ctx context.Context, name string) (result []BrandItem, err error) { + xClient, err := client.GetClient(b) + if err != nil { + return + } + err = xClient.Call(ctx, "FindByIds", name, &result) + return +} From 4b7686fd63474c67948c407e31422cf2af1ad37d Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 11 Aug 2022 14:25:01 +0800 Subject: [PATCH 3/6] =?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/brand.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supply/brand.go b/supply/brand.go index 150824c..f9a54ca 100644 --- a/supply/brand.go +++ b/supply/brand.go @@ -98,6 +98,6 @@ func (b *brand) Export(ctx context.Context, name string) (result []BrandItem, er if err != nil { return } - err = xClient.Call(ctx, "FindByIds", name, &result) + err = xClient.Call(ctx, "Export", name, &result) return } From 3abbea37175bc018a2651935f02a762e0770d2d1 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 11 Aug 2022 15:03:23 +0800 Subject: [PATCH 4/6] =?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/sku.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index cfa63b0..4d7dbae 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -60,8 +60,9 @@ type ArgsSkuAdd struct { } type SkuImg struct { - Id uint `json:"id"` - Path string `json:"path"` + Id uint `json:"id"` + Path string `json:"path"` + ReplacePath string `json:"replacePath"` } type SkuSpecification struct { @@ -238,6 +239,7 @@ func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err erro type ArgsReplaceImg struct { Id uint + SkuId uint ReplacePath string } From e1485bd83fe5a0c269905629285d10cb85066ebc Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 11 Aug 2022 15:12:53 +0800 Subject: [PATCH 5/6] =?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/channel/order.go | 2 +- supply/sku.go | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/supply/channel/order.go b/supply/channel/order.go index db2609e..6e3a5aa 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -74,7 +74,7 @@ type ReplyOrderSubmit struct { } // Submit @Title 下单 -func (o *order) Submit(ctx context.Context, channelId string, args ArgsOrderSubmit) (reply []ReplyOrderSubmit, err error) { +func (o *order) Submit(ctx context.Context, channelId string, args ArgsOrderSubmit) (reply ReplyOrderSubmit, err error) { xClient, err := client.GetClient(o) if err != nil { return diff --git a/supply/sku.go b/supply/sku.go index cfa63b0..d9ad63f 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -251,3 +251,49 @@ func (s *sku) ReplaceImg(ctx context.Context, args ArgsReplaceImg) (err error) { err = xClient.Call(ctx, "ReplaceImg", args, &reply) return } + +type ArgsSkuChangePrice struct { + SourceSkuId string // 源skuId + SupplyPrice decimal.Decimal // 采购价 + GuidePrice decimal.Decimal // 指导价-建议售价 + Source source // 商品来源 +} + +// ChangePrice @Title 更新价格 +func (s *sku) ChangePrice(ctx context.Context, args ArgsSkuChangePrice) (err error) { + reply := 0 + xClient, err := client.GetClient(s) + if err != nil { + return err + } + err = xClient.Call(ctx, "ChangePrice", args, &reply) + return +} + +type ArgsSkuChangeData struct { + SourceSkuId string // 源skuId + SourceStatus uint // 源状态 + Name string // 商品名称 + BrandId uint // 品牌id + ThirdCategoryId uint // 三级分类id + SupplyPrice decimal.Decimal // 采购价 + GuidePrice decimal.Decimal // 指导价-建议售价 + Size string // 尺码 + Color string // 颜色 + Tax string // 税率 + Unit string // 销售单位 + UpcCode string // 商品条码 + Source source // 商品来源 + Specifications []SkuSpecification // 商品参数信息 +} + +// ChangeData @Title 更新商品信息 +func (s *sku) ChangeData(ctx context.Context, args ArgsSkuChangeData) (err error) { + reply := 0 + xClient, err := client.GetClient(s) + if err != nil { + return err + } + err = xClient.Call(ctx, "ChangeData", args, &reply) + return +} From c69e3468ef591efb9db3f51ca4fafc673906bc7e Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 11 Aug 2022 16:55:48 +0800 Subject: [PATCH 6/6] =?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/sku.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/supply/sku.go b/supply/sku.go index 4d7dbae..93daafe 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -147,6 +147,8 @@ type SkuItem struct { CustomerProfitRate decimal.Decimal `json:"customerProfitRate"` // 供货利润率 供货利润/供货最高价% AdjustType uint `json:"adjustType"` // 加价类型 AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 + AfterAdjustType uint `json:"afterType"` // 改价后加价类型 + AfterAdjustPrice decimal.Decimal `json:"afterPrice"` // 改价后加价金额 Handle uint `json:"handle"` // 1=未处理 2=已处理 Reason string `json:"reason"` // 驳回原因 }