From 326319ebc598eaee714ca254f0c52873f4d17837 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 12 Aug 2022 14:39:20 +0800 Subject: [PATCH 01/16] =?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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index 47e364d..6d4f171 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -60,9 +60,8 @@ type ArgsSkuAdd struct { } type SkuImg struct { - Id uint `json:"id"` - Path string `json:"path"` - ReplacePath string `json:"replacePath"` + Id uint `json:"id"` + Path string `json:"path"` } type SkuSpecification struct { From 3408c0bb26abeab24245f34cfc31c876ff44ad32 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 12 Aug 2022 15:04:24 +0800 Subject: [PATCH 02/16] =?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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index cfa63b0..4a7beb5 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -146,6 +146,8 @@ type SkuItem struct { CustomerProfitRate decimal.Decimal `json:"customerProfitRate"` // 供货利润率 供货利润/供货最高价% AdjustType uint `json:"adjustType"` // 加价类型 AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 + AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 + AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额 Handle uint `json:"handle"` // 1=未处理 2=已处理 Reason string `json:"reason"` // 驳回原因 } @@ -237,8 +239,9 @@ func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err erro } type ArgsReplaceImg struct { - Id uint - ReplacePath string + SkuId uint + Id uint + Path string } // ReplaceImg @Title 替换图片 From c43960d9c86c81450d15bfb0cbe49bd1e21a26cc Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 12 Aug 2022 15:16:07 +0800 Subject: [PATCH 03/16] =?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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/supply/brand.go b/supply/brand.go index d4516ff..e804eec 100644 --- a/supply/brand.go +++ b/supply/brand.go @@ -49,6 +49,16 @@ func (b *brand) All(ctx context.Context) (result []BrandItem, err error) { return } +// All2 @Title 品牌名称筛选品牌 +func (b *brand) All2(ctx context.Context, name string) (result []BrandItem, err error) { + xClient, err := client.GetClient(b) + if err != nil { + return + } + err = xClient.Call(ctx, "All2", 0, &result) + return +} + type ArgsBrandAdd struct { Name string // 品牌名称 } From f68613e0668d7b9cd7260bcb8d9e83d0f0c6237b Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 12 Aug 2022 15:26:36 +0800 Subject: [PATCH 04/16] =?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 e804eec..436e0eb 100644 --- a/supply/brand.go +++ b/supply/brand.go @@ -55,7 +55,7 @@ func (b *brand) All2(ctx context.Context, name string) (result []BrandItem, err if err != nil { return } - err = xClient.Call(ctx, "All2", 0, &result) + err = xClient.Call(ctx, "All2", name, &result) return } From 6fc1826e4dd2a79d85037fc2e927d5098b6fc626 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 12 Aug 2022 15:51:21 +0800 Subject: [PATCH 05/16] =?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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supply/brand.go b/supply/brand.go index 436e0eb..8ac4215 100644 --- a/supply/brand.go +++ b/supply/brand.go @@ -49,13 +49,13 @@ func (b *brand) All(ctx context.Context) (result []BrandItem, err error) { return } -// All2 @Title 品牌名称筛选品牌 -func (b *brand) All2(ctx context.Context, name string) (result []BrandItem, err error) { +// FindByNameAll @Title 品牌名称筛选品牌 +func (b *brand) FindByNameAll(ctx context.Context, name string) (result []BrandItem, err error) { xClient, err := client.GetClient(b) if err != nil { return } - err = xClient.Call(ctx, "All2", name, &result) + err = xClient.Call(ctx, "FindByNameAll", name, &result) return } From 09944b0a82f9a6262d64536dd411a16c0d6ec9de Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 12 Aug 2022 17:01:44 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index ee277f6..6a3c8a6 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -43,6 +43,8 @@ type SkuItem struct { Status uint `json:"status"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` + TaxName string `json:"taxName"` + TaxCode string `json:"taxCode"` } type ReplySkuList struct { Lists []SkuItem `json:"lists"` @@ -90,6 +92,8 @@ type SkuDetailItem struct { Imgs []SkuImg `json:"imgs"` Specifications []SkuSpecification `json:"specifications"` GroupSkuIds []uint `json:"groupSkuIds"` + TaxName string + TaxCode string } type SkuImg struct { Path string `json:"path"` From 59390276a7e41987080c9a4360ad2079e02ee662 Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 12 Aug 2022 17:02:54 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index 6a3c8a6..55ce82c 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -40,11 +40,11 @@ type SkuItem struct { Tax string `json:"tax"` Unit string `json:"unit"` UpcCode string `json:"upcCode"` + TaxName string `json:"taxName"` + TaxCode string `json:"taxCode"` Status uint `json:"status"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` - TaxName string `json:"taxName"` - TaxCode string `json:"taxCode"` } type ReplySkuList struct { Lists []SkuItem `json:"lists"` @@ -85,6 +85,8 @@ type SkuDetailItem struct { Tax string `json:"tax"` Unit string `json:"unit"` UpcCode string `json:"upcCode"` + TaxName string `json:"taxName"` + TaxCode string `json:"taxCode"` Status uint `json:"status"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` @@ -92,8 +94,6 @@ type SkuDetailItem struct { Imgs []SkuImg `json:"imgs"` Specifications []SkuSpecification `json:"specifications"` GroupSkuIds []uint `json:"groupSkuIds"` - TaxName string - TaxCode string } type SkuImg struct { Path string `json:"path"` From e16ecb35afc1bab4273c203549244d5b6f31014d Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 15 Aug 2022 10:16:10 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/brand.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/jd/brand.go b/jd/brand.go index 3ad00d1..b145ac5 100644 --- a/jd/brand.go +++ b/jd/brand.go @@ -48,17 +48,3 @@ func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error { } return xClient.Call(ctx, "Edit", args, &reply) } - -type ArgsImport struct { - Name string // 品牌名称 - SupplyBrandId uint // 匹配的品牌Id -} - -func (b *brand) Import(ctx context.Context, args []ArgsImport) error { - reply := 0 - xClient, err := client.GetClient(b) - if err != nil { - return err - } - return xClient.Call(ctx, "Import", args, &reply) -} From 1498fbe37c3aedfc8f6b31b50b37a04aca433f93 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 15 Aug 2022 10:40:15 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/brand.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jd/brand.go b/jd/brand.go index b145ac5..6a1e96b 100644 --- a/jd/brand.go +++ b/jd/brand.go @@ -48,3 +48,13 @@ func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error { } return xClient.Call(ctx, "Edit", args, &reply) } + +// FindBrandByName @Title 根据品牌名称获取全部品牌 +func (b *brand) FindBrandByName(ctx context.Context, name string) (reply []BrandItem, err error) { + xClient, err := client.GetClient(b) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "FindBrandByName", name, &reply) + return +} From aee70d3f2b1ac5fccd7bdccb8689937eb392cf95 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 15 Aug 2022 14:27:07 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=AC=E4=B8=9C?= =?UTF-8?q?=E5=BA=9F=E5=BC=83=E5=95=86=E5=93=81=E8=BF=94=E5=9B=9E=E5=BE=85?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/sku.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jd/sku.go b/jd/sku.go index 79574e2..8830e71 100644 --- a/jd/sku.go +++ b/jd/sku.go @@ -238,3 +238,13 @@ func (s *sku) ReplaceImgJdSku(ctx context.Context, args ArgsSkuReplaceImgJdSku) } return xClient.Call(ctx, "ReplaceImgJdSku", args, &reply) } + +// ReHandle @Title 重新处理商品 +func (s *sku) ReHandle(ctx context.Context, skuId uint) error { + reply := 0 + xClient, err := client.GetClient(s) + if err != nil { + return err + } + return xClient.Call(ctx, "ReHandle", skuId, &reply) +} From 5932d9d04e03b28fe930e53d3879c05775538b0e Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 16 Aug 2022 13:49:42 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E6=9B=B4=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 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index 4a7beb5..356788f 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -239,9 +239,9 @@ func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err erro } type ArgsReplaceImg struct { - SkuId uint - Id uint - Path string + SkuId uint + Id uint + ReplacePath string } // ReplaceImg @Title 替换图片 @@ -254,3 +254,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 ad0b30d4cc8f5d62bf70db828d91e61f1bcf541b Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 16 Aug 2022 13:53:07 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E6=9B=B4=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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index 356788f..12a66d7 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -239,9 +239,9 @@ func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err erro } type ArgsReplaceImg struct { - SkuId uint - Id uint - ReplacePath string + SkuId uint + Id uint + Path string } // ReplaceImg @Title 替换图片 From 25d8333f0aa070c247ca30b38e080f23171526cf Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 17 Aug 2022 15:47:48 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index 55ce82c..44e0986 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -119,6 +119,30 @@ func (s *sku) Details(ctx context.Context, channelId string, args ArgsSkuDetails return } +type ArgsSkuPrices struct { + SkuIds []uint // sku数组 +} +type SkuPrice struct { + Id uint `json:"id"` + Name string `json:"name"` + Price decimal.Decimal `json:"price"` + GuidePrice decimal.Decimal `json:"guidePrice"` + Profit decimal.Decimal `json:"profit"` + Status uint `json:"status"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` +} + +// Prices @Title 获取sku价格 +func (s *sku) Prices(ctx context.Context, channelId string, args ArgsSkuPrices) (reply []SkuPrice, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Prices", args, &reply) + return +} + type ArgsSkuStock struct { Address string // 地址 Skus []SkuStockItem // sku信息 From 508fb8ea5480e2341162f1e0df1b50c1c3122224 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 18 Aug 2022 11:27:49 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index 44e0986..265225f 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -143,6 +143,25 @@ func (s *sku) Prices(ctx context.Context, channelId string, args ArgsSkuPrices) return } +type ArgsSkuGroups struct { + SkuIds []uint // sku数组 +} + +type SkuGroup struct { + SkuId uint `json:"skuId"` + GroupSkuIds []uint `json:"groupSkuIds"` +} + +// Groups @Title 获取sku分组信息 +func (s *sku) Groups(ctx context.Context, channelId string, args ArgsSkuGroups) (reply []SkuGroup, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Groups", args, &reply) + return +} + type ArgsSkuStock struct { Address string // 地址 Skus []SkuStockItem // sku信息 From 24285c22025aeea253a5b6abe015548ffeeb7f3a Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 19 Aug 2022 09:02:28 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/service/audit/supply.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/customer/service/audit/supply.go b/customer/service/audit/supply.go index 368109e..bcaed84 100644 --- a/customer/service/audit/supply.go +++ b/customer/service/audit/supply.go @@ -82,3 +82,20 @@ func (s *supply) Info(ctx context.Context, userServiceId uint) (reply ReplySuppl err = xClient.Call(ctx, "Info", userServiceId, &reply) return } + +type ReplyProof struct { + Name string `json:"name"` + ChannelId uint `json:"channelId"` // 用户Id + AppKey string `json:"appKey"` + AppSecret string `json:"appSecret"` +} + +// GetProof @Title 获取凭证 +func (s *supply) GetProof(ctx context.Context, userServiceId uint) (reply ReplyProof, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "GetProof", userServiceId, &reply) + return +} From c70fd572050ea658defe192ebf522cf0c95fa533 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 19 Aug 2022 09:36:54 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/service/service.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/customer/service/service.go b/customer/service/service.go index 3eaf512..6a5b359 100644 --- a/customer/service/service.go +++ b/customer/service/service.go @@ -16,10 +16,11 @@ type ArgsServiceLists struct { } type ReplyServiceLists struct { - ServiceId uint `json:"serviceId"` - ServiceName string `json:"serviceName"` - EndTime int64 `json:"endTime"` - AuditStatus uint `json:"auditStatus"` + UserServiceId uint `json:"userServiceId"` + ServiceId uint `json:"serviceId"` + ServiceName string `json:"serviceName"` + EndTime int64 `json:"endTime"` + AuditStatus uint `json:"auditStatus"` } type service struct {