From e3219eb68aacd1e5877bca33233620072c0ab214 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 14 Oct 2022 13:59:55 +0800 Subject: [PATCH 01/64] =?UTF-8?q?ListsEs=E6=B7=BB=E5=8A=A0sourceId?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/sku.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/sku.go b/supply/sku.go index 5cff011..e319b57 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -163,6 +163,7 @@ func (s *sku) Lists(ctx context.Context, args ArgsSkuLists) (reply ReplySkuList, } type SkuEsSearch struct { + SourceId uint // 所属供应商 京东、沙马 SourceStatus uint // 供应商上下架状态 1=上架 2=下架 PlatformStatus uint // 平台上下架状态 1=上架 2=下架 SkuId uint // Sku编码 From 5e7a380a8c021ff89ac7a35f4b26bb421061cfe7 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 14 Oct 2022 14:03:48 +0800 Subject: [PATCH 02/64] =?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 | 1 - 1 file changed, 1 deletion(-) diff --git a/supply/sku.go b/supply/sku.go index e319b57..5cff011 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -163,7 +163,6 @@ func (s *sku) Lists(ctx context.Context, args ArgsSkuLists) (reply ReplySkuList, } type SkuEsSearch struct { - SourceId uint // 所属供应商 京东、沙马 SourceStatus uint // 供应商上下架状态 1=上架 2=下架 PlatformStatus uint // 平台上下架状态 1=上架 2=下架 SkuId uint // Sku编码 From e73f8a220bd35ad7922bc8336815c6a033aab05b Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 14 Oct 2022 15:34:32 +0800 Subject: [PATCH 03/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/mq.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/supply/channel/mq.go b/supply/channel/mq.go index 22b44c2..681361d 100644 --- a/supply/channel/mq.go +++ b/supply/channel/mq.go @@ -7,14 +7,20 @@ import ( ) const ( - MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 - MqSubscribeNameSkuChange = "sku_change" // sku信息变动 + MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 + MqSubscribeNameSkuChange = "sku_change" // sku信息变动 + MqSubscribeNameOrderSplit = "order_split" // 订单拆单 + MqSubscribeNameOrderLadingBill = "order_lading_bill" // 提单 + MqSubscribeNameOrderStockOut = "order_stock_out" // 订单出库 + MqSubscribeNameOrderFinish = "order_finish" // 订单完成 + MqSubscribeNameOrderCancel = "order_cancel" // 订单取消 ) type mq struct { } type ArgsMqSubscribe struct { - Name string // 队列名称 + Name string // 队列名称 + AppKey string // 队列名称 } // Subscribe @Title 订阅mq From 5ea405ce606ab8594446c8da540eafde8b1ef5ae Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 14 Oct 2022 15:35:55 +0800 Subject: [PATCH 04/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/channel.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/channel/channel.go b/supply/channel/channel.go index 4d4ef19..d6022c8 100644 --- a/supply/channel/channel.go +++ b/supply/channel/channel.go @@ -4,4 +4,5 @@ type Channel struct { Sku sku Order order AfterService afterService + Mq mq } From 4502558d873f213f555aef6c88927bb7fa4bfb99 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 14 Oct 2022 16:26:19 +0800 Subject: [PATCH 05/64] =?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 | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/sku.go b/supply/sku.go index 5cff011..5855669 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -163,6 +163,7 @@ func (s *sku) Lists(ctx context.Context, args ArgsSkuLists) (reply ReplySkuList, } type SkuEsSearch struct { + SourceId uint // 所属供应商 SourceStatus uint // 供应商上下架状态 1=上架 2=下架 PlatformStatus uint // 平台上下架状态 1=上架 2=下架 SkuId uint // Sku编码 From 6533281d0188b29cdae9967ecdfdfbe4dad66161 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 17 Oct 2022 11:47:40 +0800 Subject: [PATCH 06/64] =?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/order.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/supply/order.go b/supply/order.go index ad0fcc6..03514d9 100644 --- a/supply/order.go +++ b/supply/order.go @@ -122,8 +122,6 @@ type RetailOrderItem struct { SourceName string `json:"sourceName"` CustomerName string `json:"customerName"` OrderStatus uint `json:"orderStatus"` - LogisticsName string `json:"logisticsName"` - WaybillCode string `json:"waybillCode"` OrderFee decimal.Decimal `json:"orderFee"` FreightFee decimal.Decimal `json:"freightFee"` SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` From cec87b926b4292df9b05eb8befc8732c0da47321 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 17 Oct 2022 14:51:04 +0800 Subject: [PATCH 07/64] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/afterService.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/supply/afterService.go b/supply/afterService.go index 55f2f14..0155006 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -55,3 +55,19 @@ func (a *afterService) RetailAfsHistory(ctx context.Context, args ArgsRetailHist err = xClient.Call(ctx, "RetailAfsHistory", args, &reply) return } + +type ArgsAfterServiceDeliver struct { + SourceAfsSn string `json:"sourceAfsSn"` + SourceSkuId string `json:"sourceSkuId"` + SourceOrderSN string `json:"sourceOrderSN"` +} + +// Deliver @Title 需要发货 +func (a *afterService) Deliver(ctx context.Context, args ArgsAfterServiceDeliver, reply *int) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return err + } + err = xClient.Call(ctx, "Deliver", args, &reply) + return +} From fd75035e4c6b44df438497dacd7dcb8400d41f88 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 17 Oct 2022 15:03:41 +0800 Subject: [PATCH 08/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/afterService.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supply/afterService.go b/supply/afterService.go index 0155006..cb985f3 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -63,11 +63,12 @@ type ArgsAfterServiceDeliver struct { } // Deliver @Title 需要发货 -func (a *afterService) Deliver(ctx context.Context, args ArgsAfterServiceDeliver, reply *int) (err error) { +func (a *afterService) Deliver(ctx context.Context, args ArgsAfterServiceDeliver) (err error) { xClient, err := client.GetClient(a) if err != nil { return err } + reply := 0 err = xClient.Call(ctx, "Deliver", args, &reply) return } From b180a3dec4e253c8252d01fb07d66c05b0d63a2b Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 17 Oct 2022 15:22:21 +0800 Subject: [PATCH 09/64] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/afterService.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/supply/afterService.go b/supply/afterService.go index cb985f3..da62d9f 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -72,3 +72,37 @@ func (a *afterService) Deliver(ctx context.Context, args ArgsAfterServiceDeliver err = xClient.Call(ctx, "Deliver", args, &reply) return } + +type ArgsAfterServiceReceipt struct { + SourceAfsSn string `json:"sourceAfsSn"` + SourceSkuId string `json:"sourceSkuId"` + SourceOrderSN string `json:"sourceOrderSN"` +} + +// Receipt @Title 收货处理 +func (a *afterService) Receipt(ctx context.Context, args ArgsAfterServiceReceipt) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return err + } + reply := 0 + err = xClient.Call(ctx, "Receipt", args, &reply) + return +} + +type ArgsAfterService struct { + SourceAfsSn string `json:"sourceAfsSn"` + SourceSkuId string `json:"sourceSkuId"` + SourceOrderSN string `json:"sourceOrderSN"` +} + +// Reject @Title 驳回 +func (a *afterService) Reject(ctx context.Context, args ArgsAfterService) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return err + } + reply := 0 + err = xClient.Call(ctx, "Reject", args, &reply) + return +} From 999fc4b030859e8b1615ba81f858cf53a27b5d96 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 17 Oct 2022 15:24:47 +0800 Subject: [PATCH 10/64] =?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/afterService.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supply/afterService.go b/supply/afterService.go index da62d9f..c2d2684 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -90,14 +90,14 @@ func (a *afterService) Receipt(ctx context.Context, args ArgsAfterServiceReceipt return } -type ArgsAfterService struct { +type ArgsAfterServiceReject struct { SourceAfsSn string `json:"sourceAfsSn"` SourceSkuId string `json:"sourceSkuId"` SourceOrderSN string `json:"sourceOrderSN"` } // Reject @Title 驳回 -func (a *afterService) Reject(ctx context.Context, args ArgsAfterService) (err error) { +func (a *afterService) Reject(ctx context.Context, args ArgsAfterServiceReject) (err error) { xClient, err := client.GetClient(a) if err != nil { return err From c3e7dd629591c70b2bdf1311d7e39030067e2cb1 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 17 Oct 2022 15:46:34 +0800 Subject: [PATCH 11/64] =?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/afterService.go | 3 +++ supply/sku.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/supply/afterService.go b/supply/afterService.go index 55f2f14..e5658ce 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -29,12 +29,15 @@ type RetailHistorySearch struct { } type RetailHistoryItem struct { + Id uint `json:"id"` + Img string `json:"img"` AfterServiceSn uint64 `json:"afterServiceSn"` OrderSn uint64 `json:"orderSn"` Name string `json:"name"` Quantity uint `json:"quantity"` Status uint `json:"status"` Reason string `json:"reason"` + Result string `json:"result"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` Source string `json:"source"` diff --git a/supply/sku.go b/supply/sku.go index 5855669..15a59a7 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -109,12 +109,12 @@ type ArgsSkuLists struct { } type SkuListsSearch struct { + Id uint // 瑞库客id Name string // 商品名称 SourceId uint // 所属供应商 1=京东 - Id uint // 瑞库客id SourceSkuId uint // 供应商skuId BrandId uint // 品牌Id - ThridCategoryId uint // 三级分类Id + ThirdCategoryId uint // 三级分类Id AdjustType uint // 加价规则 MaxSupplyPrice decimal.Decimal // 最大采购价格 MinSupplyPrice decimal.Decimal // 最小采购价格 From c6110b3b0637fa123100d5fe086aa10a677270ee Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 17 Oct 2022 17:15:41 +0800 Subject: [PATCH 12/64] =?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/afterService.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/supply/afterService.go b/supply/afterService.go index 656b51b..4fec33a 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -30,14 +30,12 @@ type RetailHistorySearch struct { type RetailHistoryItem struct { Id uint `json:"id"` - Img string `json:"img"` AfterServiceSn uint64 `json:"afterServiceSn"` OrderSn uint64 `json:"orderSn"` Name string `json:"name"` Quantity uint `json:"quantity"` Status uint `json:"status"` Reason string `json:"reason"` - Result string `json:"result"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` Source string `json:"source"` From 00178f9d29805d0075f216f6e62ee634e8dba9a0 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 17 Oct 2022 17:40:00 +0800 Subject: [PATCH 13/64] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mq=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/mq.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/supply/channel/mq.go b/supply/channel/mq.go index 681361d..608b7b9 100644 --- a/supply/channel/mq.go +++ b/supply/channel/mq.go @@ -33,3 +33,14 @@ func (m *mq) Subscribe(ctx context.Context, channelId string, args ArgsMqSubscri err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Subscribe", args, &reply) return } + +// SubscribeCancel @Title 订阅取消 +func (m *mq) SubscribeCancel(ctx context.Context, channelId string, args ArgsMqSubscribe) (err error) { + reply := 0 + xClient, err := client.GetClient(m) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "SubscribeCancel", args, &reply) + return +} From 68f87f04b683019dc4344a0d68b8a5a64ec0c7d2 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 18 Oct 2022 13:45:17 +0800 Subject: [PATCH 14/64] =?UTF-8?q?es=E5=A2=9E=E5=8A=A0skuIds=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index c3d73f3..533ee30 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -64,6 +64,7 @@ func (s *sku) Lists(ctx context.Context, channelId string, args ArgsSkuList) (re } type SkuEsSearch struct { + SkuIds []uint // 商品SkuIds Status uint // 1=上架 2=下架 SkuName string // 商品名称 BrandId uint // 品牌id From f15510acf70d937e495ff4c925013df4dd9589ae Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 18 Oct 2022 13:45:48 +0800 Subject: [PATCH 15/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E9=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/mq.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/supply/channel/mq.go b/supply/channel/mq.go index 608b7b9..48e62d0 100644 --- a/supply/channel/mq.go +++ b/supply/channel/mq.go @@ -7,13 +7,12 @@ import ( ) const ( - MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 - MqSubscribeNameSkuChange = "sku_change" // sku信息变动 - MqSubscribeNameOrderSplit = "order_split" // 订单拆单 - MqSubscribeNameOrderLadingBill = "order_lading_bill" // 提单 - MqSubscribeNameOrderStockOut = "order_stock_out" // 订单出库 - MqSubscribeNameOrderFinish = "order_finish" // 订单完成 - MqSubscribeNameOrderCancel = "order_cancel" // 订单取消 + MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 + MqSubscribeNameSkuChange = "sku_change" // sku信息变动 + MqSubscribeNameOrderSplit = "order_split" // 订单拆单 + MqSubscribeNameOrderStockOut = "order_stock_out" // 订单出库 + MqSubscribeNameOrderFinish = "order_finish" // 订单完成 + MqSubscribeNameOrderCancel = "order_cancel" // 订单取消 ) type mq struct { @@ -24,13 +23,12 @@ type ArgsMqSubscribe struct { } // Subscribe @Title 订阅mq -func (m *mq) Subscribe(ctx context.Context, channelId string, args ArgsMqSubscribe) (err error) { - reply := 0 +func (m *mq) Subscribe(ctx context.Context, channelId string, args ArgsMqSubscribe) (key string, err error) { xClient, err := client.GetClient(m) if err != nil { return } - err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Subscribe", args, &reply) + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Subscribe", args, &key) return } From 02c1aa595d4ef61236f257efa4d7f8dbf51d85ab Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 18 Oct 2022 14:15:11 +0800 Subject: [PATCH 16/64] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mq=E7=94=A8=E6=88=B7?= =?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/mq.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/supply/channel/mq.go b/supply/channel/mq.go index 48e62d0..e5db283 100644 --- a/supply/channel/mq.go +++ b/supply/channel/mq.go @@ -42,3 +42,19 @@ func (m *mq) SubscribeCancel(ctx context.Context, channelId string, args ArgsMqS err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "SubscribeCancel", args, &reply) return } + +type ArgsMqUser struct { + AppKey string + AppSecret string +} + +// User @Title Mq用户 +func (m *mq) User(ctx context.Context, channelId string, args ArgsMqUser) (err error) { + reply := 0 + xClient, err := client.GetClient(m) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "User", args, &reply) + return +} From 2a8581f68b196d030af2aadae6238d238485adf7 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 18 Oct 2022 16:33:29 +0800 Subject: [PATCH 17/64] =?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/channel/afterService.go | 35 ++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/supply/channel/afterService.go b/supply/channel/afterService.go index 66dfbbb..8326048 100644 --- a/supply/channel/afterService.go +++ b/supply/channel/afterService.go @@ -179,22 +179,25 @@ func (a *afterService) Lists(ctx context.Context, channelId string, args ArgsAft } type ReplyAfterServiceDetail struct { - Id uint `json:"id"` - AfsSn string `json:"afsSn"` - ReceiverName string `json:"receiverName"` - ReceiverMobile string `json:"receiverMobile"` - Status uint `json:"status"` - Result string `json:"result"` - CreatedAt int64 `json:"createdAt"` - UpdatedAt int64 `json:"updatedAt"` - SkuName string `json:"skuName"` - ImgUrl string `json:"imgUrl"` - SkuId uint `json:"skuId"` - Price decimal.Decimal `json:"price"` - Quantity uint `json:"quantity"` - HopeTypeName string `json:"hopeTypeName"` - TypeReasonName string `json:"typeReasonName"` - Imgs []string `json:"imgs"` + Id uint `json:"id"` + AfsSn string `json:"afsSn"` + ReceiverName string `json:"receiverName"` + ReceiverMobile string `json:"receiverMobile"` + Status uint `json:"status"` + Result string `json:"result"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` + SkuName string `json:"skuName"` + ImgUrl string `json:"imgUrl"` + SkuId uint `json:"skuId"` + Price decimal.Decimal `json:"price"` + Quantity uint `json:"quantity"` + HopeTypeName string `json:"hopeTypeName"` + TypeReasonName string `json:"typeReasonName"` + Imgs []string `json:"imgs"` + LogisticsCompany string `json:"logisticsCompany"` + WaybillCode string `json:"waybillCode"` + SendAt int64 `json:"sendAt"` } // Detail @Title 售后详情 From db843977f83aec4ad79f15d420e9e75f355dd32d Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 10:00:38 +0800 Subject: [PATCH 18/64] =?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/afterService.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/supply/afterService.go b/supply/afterService.go index 4fec33a..55fe83e 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -4,6 +4,7 @@ import ( "context" "git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/lib/bean" + "github.com/shopspring/decimal" ) const ( @@ -107,3 +108,43 @@ func (a *afterService) Reject(ctx context.Context, args ArgsAfterServiceReject) err = xClient.Call(ctx, "Reject", args, &reply) return } + +type ReplyAfterServiceInfo struct { + Id uint `json:"id"` + OrderStatus uint `json:"orderStatus"` + PayTime int64 `json:"payTime"` + FinishAt int64 `json:"finishAt"` + OrderSubSn string `json:"orderSubSn"` + Source string `json:"source"` + Customer string `json:"customer"` + OrderFee decimal.Decimal `json:"orderFee"` + FreightFee decimal.Decimal `json:"freightFee"` + Sku AfterServiceSku `json:"sku"` + Packages []RetailOrderPackage `json:"packages"` +} + +type RetailOrderPackage struct { + LogisticsName string `json:"logisticsName"` + WaybillCode string `json:"waybillCode"` +} + +type AfterServiceSku struct { + Name string `json:"name"` + SkuId uint `json:"skuId"` + SupplySkuId uint `json:"supplySkuId"` + SupplyPrice decimal.Decimal `json:"supplyPrice"` + Rate decimal.Decimal `json:"rate"` + AdjustType uint `json:"adjustType"` + Price decimal.Decimal `json:"price"` + Quantity uint `json:"quantity"` +} + +// Info @Title 零售售后详情 +func (a *afterService) Info(ctx context.Context, afsId uint) (reply ReplyAfterServiceInfo, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return ReplyAfterServiceInfo{}, err + } + err = xClient.Call(ctx, "Info", afsId, &reply) + return +} From b4b30bf0d6cc1fc5dcaf385467fffbc7bb1ced65 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 10:50:26 +0800 Subject: [PATCH 19/64] =?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/afterService.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supply/afterService.go b/supply/afterService.go index 55fe83e..e21b5e2 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -140,11 +140,11 @@ type AfterServiceSku struct { } // Info @Title 零售售后详情 -func (a *afterService) Info(ctx context.Context, afsId uint) (reply ReplyAfterServiceInfo, err error) { +func (a *afterService) Info(ctx context.Context, afsSn string) (reply ReplyAfterServiceInfo, err error) { xClient, err := client.GetClient(a) if err != nil { return ReplyAfterServiceInfo{}, err } - err = xClient.Call(ctx, "Info", afsId, &reply) + err = xClient.Call(ctx, "Info", afsSn, &reply) return } From c8f0e38cfe6bac20a00e2b25bb3a0a079fea8e9b Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 11:46:34 +0800 Subject: [PATCH 20/64] =?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/afterService.go | 60 ++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/supply/afterService.go b/supply/afterService.go index e21b5e2..92edd68 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -109,42 +109,34 @@ func (a *afterService) Reject(ctx context.Context, args ArgsAfterServiceReject) return } -type ReplyAfterServiceInfo struct { - Id uint `json:"id"` - OrderStatus uint `json:"orderStatus"` - PayTime int64 `json:"payTime"` - FinishAt int64 `json:"finishAt"` - OrderSubSn string `json:"orderSubSn"` - Source string `json:"source"` - Customer string `json:"customer"` - OrderFee decimal.Decimal `json:"orderFee"` - FreightFee decimal.Decimal `json:"freightFee"` - Sku AfterServiceSku `json:"sku"` - Packages []RetailOrderPackage `json:"packages"` -} - -type RetailOrderPackage struct { - LogisticsName string `json:"logisticsName"` - WaybillCode string `json:"waybillCode"` -} - -type AfterServiceSku struct { - Name string `json:"name"` - SkuId uint `json:"skuId"` - SupplySkuId uint `json:"supplySkuId"` - SupplyPrice decimal.Decimal `json:"supplyPrice"` - Rate decimal.Decimal `json:"rate"` - AdjustType uint `json:"adjustType"` - Price decimal.Decimal `json:"price"` - Quantity uint `json:"quantity"` -} - -// Info @Title 零售售后详情 -func (a *afterService) Info(ctx context.Context, afsSn string) (reply ReplyAfterServiceInfo, err error) { +type ReplyAfterServiceDetail struct { + Id uint `json:"id"` + AfsSn string `json:"afsSn"` + Status uint `json:"status"` + Result string `json:"result"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` + SkuName string `json:"skuName"` + ImgUrl string `json:"imgUrl"` + SkuId uint `json:"skuId"` + SupplySkuId uint `json:"supplySkuId"` + Price decimal.Decimal `json:"price"` + SupplyPrice decimal.Decimal `json:"supplyPrice"` + Quantity uint `json:"quantity"` + HopeTypeName string `json:"hopeTypeName"` + TypeReasonName string `json:"typeReasonName"` + Imgs []string `json:"imgs"` + LogisticsCompany string `json:"logisticsCompany"` + WaybillCode string `json:"waybillCode"` + SendAt int64 `json:"sendAt"` +} + +// Detail @Title 售后详情 +func (a *afterService) Detail(ctx context.Context, afsSn string) (reply ReplyAfterServiceDetail, err error) { xClient, err := client.GetClient(a) if err != nil { - return ReplyAfterServiceInfo{}, err + return } - err = xClient.Call(ctx, "Info", afsSn, &reply) + err = xClient.Call(ctx, "Detail", afsSn, &reply) return } From e150dbd2eaf7173c23e3a6f7b36700f7f187b031 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 11:51:46 +0800 Subject: [PATCH 21/64] =?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/afterService.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/afterService.go b/supply/afterService.go index 92edd68..aac108f 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -111,6 +111,7 @@ func (a *afterService) Reject(ctx context.Context, args ArgsAfterServiceReject) type ReplyAfterServiceDetail struct { Id uint `json:"id"` + ChannelId uint `json:"channelId"` AfsSn string `json:"afsSn"` Status uint `json:"status"` Result string `json:"result"` From b5271cbeac15d4a9cb0536b00f3272d516d21262 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 13:45:55 +0800 Subject: [PATCH 22/64] =?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/afterService.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/supply/afterService.go b/supply/afterService.go index aac108f..433e745 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -141,3 +141,20 @@ func (a *afterService) Detail(ctx context.Context, afsSn string) (reply ReplyAft err = xClient.Call(ctx, "Detail", afsSn, &reply) return } + +type ReplyAfterServiceLogisticsAddress struct { + Name string `json:"name"` // 姓名 + Mobile string `json:"mobile"` // 手机号 + ZipCode string `json:"zipCode"` // 邮编 + Address string `json:"address"` // 地址 +} + +// LogisticsAddress @Title 售后详情 +func (a *afterService) LogisticsAddress(ctx context.Context, afsSn string) (reply ReplyAfterServiceLogisticsAddress, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "LogisticsAddress", afsSn, &reply) + return +} From 426111a7f7a6e7eb2932a3b80596993035e89419 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 13:55:22 +0800 Subject: [PATCH 23/64] =?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/afterService.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/supply/afterService.go b/supply/afterService.go index 433e745..1644f56 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -111,7 +111,6 @@ func (a *afterService) Reject(ctx context.Context, args ArgsAfterServiceReject) type ReplyAfterServiceDetail struct { Id uint `json:"id"` - ChannelId uint `json:"channelId"` AfsSn string `json:"afsSn"` Status uint `json:"status"` Result string `json:"result"` @@ -149,7 +148,7 @@ type ReplyAfterServiceLogisticsAddress struct { Address string `json:"address"` // 地址 } -// LogisticsAddress @Title 售后详情 +// LogisticsAddress @Title 寄回地址 func (a *afterService) LogisticsAddress(ctx context.Context, afsSn string) (reply ReplyAfterServiceLogisticsAddress, err error) { xClient, err := client.GetClient(a) if err != nil { From 42144e7125a425a626fa2da6755490ddc215fd30 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 17:53:15 +0800 Subject: [PATCH 24/64] =?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 | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/sku.go b/supply/sku.go index 15a59a7..7bcaec7 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -146,6 +146,7 @@ type SkuItem struct { SourceStatus uint `json:"sourceStatus"` // 供应商状态 1=上架 2=下架 CustomerPrice decimal.Decimal `json:"customerPrice"` // 供货最高价 CustomerProfitRate decimal.Decimal `json:"customerProfitRate"` // 供货利润率 供货利润/供货最高价% + CustomerDiscount decimal.Decimal `json:"customerDiscount"` // 折扣 AdjustType uint `json:"adjustType"` // 加价类型 AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 From 71cd2fa679ac75c3b119a9e59cef96ec0ca1f973 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 09:55:13 +0800 Subject: [PATCH 25/64] =?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 | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/sku.go b/supply/sku.go index 7bcaec7..8b88e26 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -151,6 +151,7 @@ type SkuItem struct { AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额 + Reason string // 改价驳回原因 } // Lists @Title 商品列表 From 0ad499b45748b6639e2a8f494fca3dbeb1589637 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 11:37:02 +0800 Subject: [PATCH 26/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index b5628d6..454836d 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -10,10 +10,13 @@ import ( type goods struct { } type GoodsSearch struct { - Name string // 商品名称 - CategoryId uint64 // 类目id - BrandName string // 品牌名 - Handle uint // 处理状态 1=待处理 2=入库 3=废弃 + Name string // 商品名称 + CategoryId uint64 // 类目id + BrandName string // 品牌名 + Handle uint // 处理状态 1=待处理 2=入库 3=废弃 + SkuId uint // 供应商skuId + MinSupplyPrice decimal.Decimal // 最小采购价 + MaxSupplyPrice decimal.Decimal // 最大采购价 } type ArgsGoodsList struct { Search GoodsSearch From 2b6ac8e200b000f98614591f85213cdc50b70a86 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 15:26:16 +0800 Subject: [PATCH 27/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/supplier/goods.go b/supplier/goods.go index 454836d..e6b7702 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -171,3 +171,18 @@ func (g *goods) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptIte err = xClient.Call(ctx, "ReHandle", goodsIds, &reply) return } + +type ReplyByIdItem struct { + GoodsId uint `json:"goodsId"` + SourceName string `json:"sourceName"` +} + +// FindByIds @Title 根据商品Ids获取商品信息 +func (g *goods) FindByIds(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { + xClient, err := client.GetClient(g) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "FindByIds", goodsIds, &reply) + return +} From 8a808595b186420236c0c726f34a57fd271abd07 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 15:27:34 +0800 Subject: [PATCH 28/64] =?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/user/wallet.go | 6 ++++-- supply/sku.go | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/customer/user/wallet.go b/customer/user/wallet.go index 9df4525..a9ae2c0 100644 --- a/customer/user/wallet.go +++ b/customer/user/wallet.go @@ -11,8 +11,10 @@ type wallet struct { type walletType uint // 费用类型 const ( - WalletTypeIncome walletType = 1 // 收入 - WalletTypeExpend walletType = 2 // 支出 + WalletTypeIncome walletType = 1 // 收入 + WalletTypeExpend walletType = 2 // 支出 + WalletTypeBack = 3 // 退款 + WalletTypeConsumption = 4 // 消费 WalletStatusHandle = 1 // 处理中 WalletStatusSuccess = 2 // 成功 diff --git a/supply/sku.go b/supply/sku.go index 8b88e26..6579968 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -151,6 +151,7 @@ type SkuItem struct { AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额 + AfterPrice decimal.Decimal `json:"afterPrice"` // 改价记录 Reason string // 改价驳回原因 } From 26a17f1b5f8e95392fffd3883069bc8c49c0d47d Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 15:57:48 +0800 Subject: [PATCH 29/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index e6b7702..b74d9ed 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -177,12 +177,12 @@ type ReplyByIdItem struct { SourceName string `json:"sourceName"` } -// FindByIds @Title 根据商品Ids获取商品信息 -func (g *goods) FindByIds(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { +// FindBySkuIds @Title 根据商品Ids获取商品信息 +func (g *goods) FindBySkuIds(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { xClient, err := client.GetClient(g) if err != nil { return nil, err } - err = xClient.Call(ctx, "FindByIds", goodsIds, &reply) + err = xClient.Call(ctx, "FindBySkuIds", goodsIds, &reply) return } From 39c9b3ec940e55a83fcc1ccd9f1cafe84f39801b Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 16:05:43 +0800 Subject: [PATCH 30/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/goods.go b/supplier/goods.go index b74d9ed..bb22f49 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -178,7 +178,7 @@ type ReplyByIdItem struct { } // FindBySkuIds @Title 根据商品Ids获取商品信息 -func (g *goods) FindBySkuIds(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { +func (g *goods) FindBySkuIds(ctx context.Context, goodsIds []uint) (reply []ReplyByIdItem, err error) { xClient, err := client.GetClient(g) if err != nil { return nil, err From b303b2266bf8a5f35c47f03e81745213b5597b5e Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 16:07:59 +0800 Subject: [PATCH 31/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/goods.go b/supplier/goods.go index bb22f49..bed9bb8 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -173,7 +173,7 @@ func (g *goods) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptIte } type ReplyByIdItem struct { - GoodsId uint `json:"goodsId"` + SkuId uint `json:"skuId"` SourceName string `json:"sourceName"` } From 67dd6598a59fd224f154dc92882cf8167b260a8f Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 20 Oct 2022 17:44:21 +0800 Subject: [PATCH 32/64] =?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/sku/item.go | 1 + 1 file changed, 1 insertion(+) diff --git a/customer/sku/item.go b/customer/sku/item.go index e3d275c..c1a5b8d 100644 --- a/customer/sku/item.go +++ b/customer/sku/item.go @@ -46,6 +46,7 @@ func (i *item) Del(ctx context.Context, args ArgsSkuItemDel) error { type ArgsSkuItemLists struct { SkuTypeId uint + SkuId uint Page bean.Page } From 1c0a45f5c735eb6a48679df7a4626b0747a6cff0 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 21 Oct 2022 09:58:05 +0800 Subject: [PATCH 33/64] =?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/sku/sale.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customer/sku/sale.go b/customer/sku/sale.go index 61b16a8..b26f887 100644 --- a/customer/sku/sale.go +++ b/customer/sku/sale.go @@ -15,7 +15,7 @@ type SaleHandleItem struct { } // Add @Title 添加 -func (s *sale) Add(ctx context.Context, skuIds []uint) (reply []SaleSkuItem, err error) { +func (s *sale) Add(ctx context.Context, skuIds []uint) (reply []SaleHandleItem, err error) { xClient, err := client.GetClient(s) if err != nil { return nil, err From 59ac8cfc7c1d938faa65a528e75d943ad0dde647 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 21 Oct 2022 10:21:02 +0800 Subject: [PATCH 34/64] =?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/sku/sale.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/customer/sku/sale.go b/customer/sku/sale.go index b26f887..f110a00 100644 --- a/customer/sku/sale.go +++ b/customer/sku/sale.go @@ -24,13 +24,18 @@ func (s *sale) Add(ctx context.Context, skuIds []uint) (reply []SaleHandleItem, return } +type ArgsSaleLists struct { + SkuId uint + Page bean.Page +} + // Lists @Title 商品列表 -func (s *sale) Lists(ctx context.Context, page bean.Page) (reply ReplySaleSkuItemLists, err error) { +func (s *sale) Lists(ctx context.Context, args ArgsSaleLists) (reply ReplySaleSkuItemLists, err error) { xClient, err := client.GetClient(s) if err != nil { return ReplySaleSkuItemLists{}, err } - err = xClient.Call(ctx, "Lists", page, &reply) + err = xClient.Call(ctx, "Lists", args, &reply) return } From 95c4e579bbe7a1443e3aca579af72e86e39ce29b Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 21 Oct 2022 13:39:56 +0800 Subject: [PATCH 35/64] =?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 | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/sku.go b/supply/sku.go index 6579968..084d9ab 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -181,6 +181,7 @@ type SkuEsSearch struct { ThirdCategoryId uint // 三级分类id ThirdCategoryName string // 三级分类名称 全词匹配 AdjustType uint // 加价规则 1=比例 2=金额 + Handel uint // 处理状态 MaxSupplyPrice decimal.Decimal // 最高金额 MinSupplyPrice decimal.Decimal // 最低金额 MinDiscount decimal.Decimal // 最低折扣 From 281f96953f9b8052f7cfeb0a0e3f42f5cda7b14e Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 25 Oct 2022 09:37:29 +0800 Subject: [PATCH 36/64] =?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/skuAudit.go | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/supply/skuAudit.go b/supply/skuAudit.go index 5624d0b..d013923 100644 --- a/supply/skuAudit.go +++ b/supply/skuAudit.go @@ -96,3 +96,65 @@ func (s *skuAudit) Reject(ctx context.Context, args ArgsSkuAuditReject) error { func (s *skuAudit) Stock() { } + +type ArgsApplyHistory struct { + Search ApplyHistorySearch + Page bean.Page +} + +type ApplyHistorySearch struct { + Id uint // 瑞库客id + Name string // 商品名称 + SourceId uint // 所属供应商 1=京东 + SourceSkuId uint // 供应商skuId + BrandId uint // 品牌Id + ThirdCategoryId uint // 三级分类Id + AdjustType uint // 加价规则 + MaxSupplyPrice decimal.Decimal // 最大采购价格 + MinSupplyPrice decimal.Decimal // 最小采购价格 + CustomerProfitRate uint // 折扣 0=全部 1=5折以下 2=6 3=7 4=8 5=9折以下 + Handle uint // 处理状态 + AuditStatus uint // 审核状态 + SourceStatus uint // 供应商下架状态 + PlatformStatus uint // 平台下架状态 +} + +type ApplyHistoryItem struct { + Id uint `json:"id"` + Name string `json:"name"` // 名称 + BrandName string `json:"brandName"` // 品牌名称 + FirstCategoryId uint `json:"firstCategoryId"` // 一级分类id + SecondCategoryId uint `json:"secondCategoryId"` // 二级分类id + ThirdCategoryId uint `json:"thirdCategoryId"` // 三级分类id + SupplyPrice decimal.Decimal `json:"supplyPrice"` // 采购价 + GuidePrice decimal.Decimal `json:"guidePrice"` // 指导价 + ImgUrl string `json:"imgUrl"` // 商品主图 + PlatformStatus uint `json:"platformStatus"` // 平台状态 1=上架 2=下架 + SourceName string `json:"sourceName"` // 供应商名称 + SourceSkuId string `json:"sourceSkuId"` // 源skuId + SourceStatus uint `json:"sourceStatus"` // 供应商状态 1=上架 2=下架 + CustomerPrice decimal.Decimal `json:"customerPrice"` // 供货最高价 + CustomerProfitRate decimal.Decimal `json:"customerProfitRate"` // 供货利润率 供货利润/供货最高价% + CustomerDiscount decimal.Decimal `json:"customerDiscount"` // 折扣 + AdjustType uint `json:"adjustType"` // 加价类型 + AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 + AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 + AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额 + AfterPrice decimal.Decimal `json:"afterPrice"` // 改价记录 + Reason string // 改价驳回原因 +} + +type ReplyApplyHistoryLists struct { + Lists []ApplyHistoryItem `json:"lists"` + Total int64 `json:"total"` +} + +// ApplyHistory @Title 改价申请记录 +func (s *skuAudit) ApplyHistory(ctx context.Context, args ArgsApplyHistory) (reply []ReplyApplyHistoryLists, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "ApplyHistory", args, &reply) + return +} From 3fb66d388e2b27d913b568f7a967ad54d748a370 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 27 Oct 2022 16:07:28 +0800 Subject: [PATCH 37/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/supplier/supplier.go b/supplier/supplier.go index 88101ec..0a0902b 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -151,3 +151,18 @@ func (s *supplier) UpdateWarn(ctx context.Context, args ArgsSupplierUpdateWarn) reply := 0 return xClient.Call(ctx, "UpdateWarn", args, &reply) } + +type ReplySupplierItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// Select @Title 筛选非禁用的供应商 +func (s *supplier) Select(ctx context.Context, status uint) (reply []ReplyByIdItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "Select", status, &reply) + return +} From a8632a1dbbad4ee732f1954b21f1ddd9e99fa7c3 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 27 Oct 2022 16:14:58 +0800 Subject: [PATCH 38/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/supplier.go b/supplier/supplier.go index 0a0902b..64fafe3 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -158,7 +158,7 @@ type ReplySupplierItem struct { } // Select @Title 筛选非禁用的供应商 -func (s *supplier) Select(ctx context.Context, status uint) (reply []ReplyByIdItem, err error) { +func (s *supplier) Select(ctx context.Context, status uint) (reply []ReplySupplierItem, err error) { xClient, err := client.GetClient(s) if err != nil { return nil, err From 08facd05ebb4bc9867713b39af9b8ade0bce29a3 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 27 Oct 2022 17:18:22 +0800 Subject: [PATCH 39/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index bed9bb8..5bad243 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -178,11 +178,11 @@ type ReplyByIdItem struct { } // FindBySkuIds @Title 根据商品Ids获取商品信息 -func (g *goods) FindBySkuIds(ctx context.Context, goodsIds []uint) (reply []ReplyByIdItem, err error) { +func (g *goods) FindBySkuIds(ctx context.Context, skuIds []uint) (reply []ReplyByIdItem, err error) { xClient, err := client.GetClient(g) if err != nil { return nil, err } - err = xClient.Call(ctx, "FindBySkuIds", goodsIds, &reply) + err = xClient.Call(ctx, "FindBySkuIds", skuIds, &reply) return } From 8fdced2bc896a3b173c31758ad66af317924d31a Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 28 Oct 2022 09:30:39 +0800 Subject: [PATCH 40/64] =?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/sku/item.go | 10 ++++++++++ customer/sku/sale.go | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/customer/sku/item.go b/customer/sku/item.go index c1a5b8d..c553cca 100644 --- a/customer/sku/item.go +++ b/customer/sku/item.go @@ -69,3 +69,13 @@ func (i *item) Lists(ctx context.Context, args ArgsSkuItemLists) (reply ReplySku err = xClient.Call(ctx, "Lists", args, &reply) return } + +// DelAll @Title 删除全部商品 +func (i *item) DelAll(ctx context.Context, skuTypeId uint) error { + xClient, err := client.GetClient(i) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "DelAll", skuTypeId, &reply) +} diff --git a/customer/sku/sale.go b/customer/sku/sale.go index f110a00..8e074c7 100644 --- a/customer/sku/sale.go +++ b/customer/sku/sale.go @@ -79,3 +79,14 @@ func (s *sale) GetImg(ctx context.Context) (reply string, err error) { err = xClient.Call(ctx, "GetImg", args, &reply) return } + +// DelAll @Title 删除全部商品 +func (s *sale) DelAll(ctx context.Context) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + args := 0 + reply := 0 + return xClient.Call(ctx, "DelAll", args, &reply) +} From bfd474c9a99de691bf56dfc48a6b06211a4c4e75 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 28 Oct 2022 10:25:39 +0800 Subject: [PATCH 41/64] =?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/user/wallet.go | 7 +++---- supply/sku.go | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/customer/user/wallet.go b/customer/user/wallet.go index a9ae2c0..89f1ae8 100644 --- a/customer/user/wallet.go +++ b/customer/user/wallet.go @@ -11,10 +11,9 @@ type wallet struct { type walletType uint // 费用类型 const ( - WalletTypeIncome walletType = 1 // 收入 - WalletTypeExpend walletType = 2 // 支出 - WalletTypeBack = 3 // 退款 - WalletTypeConsumption = 4 // 消费 + WalletTypeIncome walletType = 1 // 收入 + WalletTypeExpend walletType = 2 // 支出 + WalletTypeBack walletType = 3 // 退款 WalletStatusHandle = 1 // 处理中 WalletStatusSuccess = 2 // 成功 diff --git a/supply/sku.go b/supply/sku.go index 084d9ab..0485bb6 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -167,6 +167,8 @@ func (s *sku) Lists(ctx context.Context, args ArgsSkuLists) (reply ReplySkuList, type SkuEsSearch struct { SourceId uint // 所属供应商 + SourceSonId uint // 沙马供应商的供应商Id + SourceSkuId uint // 供应商SkuId SourceStatus uint // 供应商上下架状态 1=上架 2=下架 PlatformStatus uint // 平台上下架状态 1=上架 2=下架 SkuId uint // Sku编码 From 705654c8adb6cebeaf856f7f9ffecac59ba42ed2 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 28 Oct 2022 13:38:48 +0800 Subject: [PATCH 42/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index 5bad243..630e27c 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -173,8 +173,9 @@ func (g *goods) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptIte } type ReplyByIdItem struct { - SkuId uint `json:"skuId"` - SourceName string `json:"sourceName"` + SkuId uint `json:"skuId"` + SupplierId uint `json:"supplierIds"` + SupplierName string `json:"supplierName"` } // FindBySkuIds @Title 根据商品Ids获取商品信息 From faeefe293367104af0e9c14fcf6a362a88c4435d Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 28 Oct 2022 15:30:10 +0800 Subject: [PATCH 43/64] =?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 | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/sku.go b/supply/sku.go index 0485bb6..245ce7b 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -141,6 +141,7 @@ type SkuItem struct { GuidePrice decimal.Decimal `json:"guidePrice"` // 指导价 ImgUrl string `json:"imgUrl"` // 商品主图 PlatformStatus uint `json:"platformStatus"` // 平台状态 1=上架 2=下架 + SourceId uint `json:"sourceId"` // 所属供应商 SourceName string `json:"sourceName"` // 供应商名称 SourceSkuId string `json:"sourceSkuId"` // 源skuId SourceStatus uint `json:"sourceStatus"` // 供应商状态 1=上架 2=下架 From 8f40f1a019a1b2ae65aca1c5ca16cc09cf9acfb6 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 31 Oct 2022 09:09:36 +0800 Subject: [PATCH 44/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/goods.go b/supplier/goods.go index 630e27c..72a2852 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -34,6 +34,7 @@ type GoodsItem struct { SkuItems []GoodsItemLists `json:"skuItems"` StockCount uint `json:"stockCount"` MinPrice decimal.Decimal `json:"minPrice"` + GuidePrice decimal.Decimal `json:"guidePrice"` CreatedAt int64 `json:"createdAt"` } From 29145f413d2105de710e2ca3a02ef61400e09375 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 31 Oct 2022 11:05:17 +0800 Subject: [PATCH 45/64] =?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 | 32 ++++++++++++++++++-------------- supply/skuAudit.go | 1 + 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index 245ce7b..4431d6c 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -109,20 +109,23 @@ type ArgsSkuLists struct { } type SkuListsSearch struct { - Id uint // 瑞库客id - Name string // 商品名称 - SourceId uint // 所属供应商 1=京东 - SourceSkuId uint // 供应商skuId - BrandId uint // 品牌Id - ThirdCategoryId uint // 三级分类Id - AdjustType uint // 加价规则 - MaxSupplyPrice decimal.Decimal // 最大采购价格 - MinSupplyPrice decimal.Decimal // 最小采购价格 - CustomerProfitRate uint // 客户利润比 1=大于0 2=等于0 3=小于0 - Handle uint // 处理状态 - AuditStatus uint // 审核状态 - SourceStatus uint // 供应商下架状态 - PlatformStatus uint // 平台下架状态 + Id uint // 瑞库客id + Name string // 商品名称 + SourceId uint // 所属供应商 1=京东 + SourceSkuId uint // 供应商skuId + BrandId uint // 品牌Id + ThirdCategoryId uint // 三级分类Id + AdjustType uint // 加价规则 + MaxSupplyPrice decimal.Decimal // 最大采购价格 + MinSupplyPrice decimal.Decimal // 最小采购价格 + CustomerProfitRate uint // 客户利润比 1=大于0 2=等于0 3=小于0 + Handle uint // 处理状态 + AuditStatus uint // 审核状态 + SourceStatus uint // 供应商下架状态 + PlatformStatus uint // 平台下架状态 + AdjustAuditStatus uint // 改价审核状态 + AdjustAuditMinDiscount decimal.Decimal // 改价后最小折扣 + AdjustAuditMaxDiscount decimal.Decimal // 改价后最大折扣 } type ReplySkuList struct { @@ -153,6 +156,7 @@ type SkuItem struct { AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额 AfterPrice decimal.Decimal `json:"afterPrice"` // 改价记录 + AfterDiscount decimal.Decimal `json:"afterDiscount"` // 改价后折扣 Reason string // 改价驳回原因 } diff --git a/supply/skuAudit.go b/supply/skuAudit.go index d013923..3d44c46 100644 --- a/supply/skuAudit.go +++ b/supply/skuAudit.go @@ -106,6 +106,7 @@ type ApplyHistorySearch struct { Id uint // 瑞库客id Name string // 商品名称 SourceId uint // 所属供应商 1=京东 + SourceSonId uint // 沙马供应商的供应商 SourceSkuId uint // 供应商skuId BrandId uint // 品牌Id ThirdCategoryId uint // 三级分类Id From bb17d59fcf1172a42417d492a30b5f1923a1d56b Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 31 Oct 2022 14:39:26 +0800 Subject: [PATCH 46/64] =?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 | 35 +++++++++++++++++------------------ supply/skuAudit.go | 2 -- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index 4431d6c..75fc7db 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -109,23 +109,20 @@ type ArgsSkuLists struct { } type SkuListsSearch struct { - Id uint // 瑞库客id - Name string // 商品名称 - SourceId uint // 所属供应商 1=京东 - SourceSkuId uint // 供应商skuId - BrandId uint // 品牌Id - ThirdCategoryId uint // 三级分类Id - AdjustType uint // 加价规则 - MaxSupplyPrice decimal.Decimal // 最大采购价格 - MinSupplyPrice decimal.Decimal // 最小采购价格 - CustomerProfitRate uint // 客户利润比 1=大于0 2=等于0 3=小于0 - Handle uint // 处理状态 - AuditStatus uint // 审核状态 - SourceStatus uint // 供应商下架状态 - PlatformStatus uint // 平台下架状态 - AdjustAuditStatus uint // 改价审核状态 - AdjustAuditMinDiscount decimal.Decimal // 改价后最小折扣 - AdjustAuditMaxDiscount decimal.Decimal // 改价后最大折扣 + Id uint // 瑞库客id + Name string // 商品名称 + SourceId uint // 所属供应商 1=京东 + SourceSkuId uint // 供应商skuId + BrandId uint // 品牌Id + ThirdCategoryId uint // 三级分类Id + AdjustType uint // 加价规则 + MaxSupplyPrice decimal.Decimal // 最大采购价格 + MinSupplyPrice decimal.Decimal // 最小采购价格 + CustomerProfitRate uint // 客户利润比 1=大于0 2=等于0 3=小于0 + Handle uint // 处理状态 + AuditStatus uint // 审核状态 + SourceStatus uint // 供应商下架状态 + PlatformStatus uint // 平台下架状态 } type ReplySkuList struct { @@ -155,8 +152,9 @@ type SkuItem struct { AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额 - AfterPrice decimal.Decimal `json:"afterPrice"` // 改价记录 + AfterPrice decimal.Decimal `json:"afterPrice"` // 改价后金额 AfterDiscount decimal.Decimal `json:"afterDiscount"` // 改价后折扣 + AdjustAuditStatus uint `json:"adjustAuditStatus"` // 改价审核状态 Reason string // 改价驳回原因 } @@ -176,6 +174,7 @@ type SkuEsSearch struct { SourceSkuId uint // 供应商SkuId SourceStatus uint // 供应商上下架状态 1=上架 2=下架 PlatformStatus uint // 平台上下架状态 1=上架 2=下架 + AuditStatus uint // 改价审核状态 1=待审核 2=通过 3=驳回 SkuId uint // Sku编码 SupplySkuId uint // 供应商Sku编码 SkuName string // 商品名称 diff --git a/supply/skuAudit.go b/supply/skuAudit.go index 3d44c46..e714cb8 100644 --- a/supply/skuAudit.go +++ b/supply/skuAudit.go @@ -25,8 +25,6 @@ type SkuAuditSearch struct { type SkuAndAuditItem struct { AuditId uint `json:"auditId"` SkuId uint `json:"skuId"` - AfterAdjustType uint `json:"afterAdjustType"` - AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` Name string `json:"name"` SupplyPrice decimal.Decimal `json:"supplyPrice"` GuidePrice decimal.Decimal `json:"guidePrice"` From 8bbeb3d99f3409726ce690d9156ee4d98e458c71 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 31 Oct 2022 15:34:44 +0800 Subject: [PATCH 47/64] =?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 75fc7db..60fd0c8 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -192,6 +192,8 @@ type SkuEsSearch struct { MinSupplyPrice decimal.Decimal // 最低金额 MinDiscount decimal.Decimal // 最低折扣 MaxDiscount decimal.Decimal // 最高折扣 + AdjustMinDiscount decimal.Decimal // 改价后最小折扣 + AdjustMaxDiscount decimal.Decimal // 改价后最大折扣 } type ArgsSkuListsEs struct { Search SkuEsSearch From 5aa853da17022515444e40db3b230f6eec1b6111 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 1 Nov 2022 11:54:11 +0800 Subject: [PATCH 48/64] =?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/skuAudit.go | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/supply/skuAudit.go b/supply/skuAudit.go index e714cb8..c49e7db 100644 --- a/supply/skuAudit.go +++ b/supply/skuAudit.go @@ -2,11 +2,9 @@ package supply import ( "context" - "database/sql" "git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/lib/bean" "github.com/shopspring/decimal" - "time" ) type skuAudit struct { @@ -22,26 +20,41 @@ type SkuAuditSearch struct { AdjustType uint // 加价类型 Status uint // 状态 1=未审核 2=通过 3=驳回 } + +type ArgsSkuAuditEsLists struct { + Search SkuAuditEsSearch + Page bean.Page +} + +type SkuAuditEsSearch struct { + SourceId uint // 供应商id + SourceSonId uint // 沙马供应商的供应商 + AdjustType uint // 加价类型 + Status uint // 状态 1=未审核 2=通过 3=驳回 + AfterMinDiscount decimal.Decimal // 加价后最低折扣 + AfterMaxDiscount decimal.Decimal // 加价后最高折扣 +} + type SkuAndAuditItem struct { - AuditId uint `json:"auditId"` + Id uint `json:"id"` SkuId uint `json:"skuId"` Name string `json:"name"` SupplyPrice decimal.Decimal `json:"supplyPrice"` GuidePrice decimal.Decimal `json:"guidePrice"` AdjustType uint `json:"adjustType"` AdjustPrice decimal.Decimal `json:"adjustPrice"` - CustomerPrice decimal.Decimal `json:"customerPrice"` - Category string `json:"category"` + AfterPrice decimal.Decimal `json:"afterPrice"` + AfterDiscount decimal.Decimal `json:"afterDiscount"` BrandName string `json:"brandName"` SourceName string `json:"sourceName"` AuditUserId uint `json:"auditUserId"` - AuditAt sql.NullTime `json:"auditAt"` + AuditAt int64 `json:"auditAt"` ImgUrl string `json:"imgUrl"` Reason string `json:"reason"` FirstCategoryName string `json:"firstCategoryName"` SecondCategoryName string `json:"secondCategoryName"` ThirdCategoryName string `json:"thirdCategoryName"` - CreatedAt time.Time `json:"createdAt"` + CreatedAt int64 `json:"createdAt"` } type ReplySkuAuditLists struct { @@ -59,6 +72,16 @@ func (s *skuAudit) Lists(ctx context.Context, args ArgsSkuAuditLists) (reply Rep return } +// ListsEs @Title 审核列表 +func (s *skuAudit) ListsEs(ctx context.Context, args ArgsSkuAuditEsLists) (reply ReplySkuAuditLists, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "ListsEs", args, &reply) + return +} + type ArgsSkuAuditAdopt struct { AuditUserId uint // 审核人 AuditIds []uint // 审核单id From cd119dc573782013645ea21c6bb2fb6bf5c600e1 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 2 Nov 2022 14:26:36 +0800 Subject: [PATCH 49/64] =?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 60fd0c8..1562f8b 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -114,6 +114,8 @@ type SkuListsSearch struct { SourceId uint // 所属供应商 1=京东 SourceSkuId uint // 供应商skuId BrandId uint // 品牌Id + FirstCategoryId uint // 一级分类Id + SecondCategoryId uint // 二级分类Id ThirdCategoryId uint // 三级分类Id AdjustType uint // 加价规则 MaxSupplyPrice decimal.Decimal // 最大采购价格 From 6084d802ffd53cc493fca986d40211b0a97045f7 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 3 Nov 2022 14:50:26 +0800 Subject: [PATCH 50/64] =?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/user.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/customer/user.go b/customer/user.go index edc14a4..c0a1bf5 100644 --- a/customer/user.go +++ b/customer/user.go @@ -152,8 +152,9 @@ func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply } type UserInfoItem struct { - Id uint `json:"id"` - Name string `json:"name"` + Id uint `json:"id"` + Name string `json:"name"` + RateId uint `json:"rateId"` } // FindByIds @Title 根据用户Ids查询用户信息 From 9debf5d54ae275123af3e2e9338659a8bf88cd99 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 3 Nov 2022 14:54:56 +0800 Subject: [PATCH 51/64] =?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/user.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/customer/user.go b/customer/user.go index c0a1bf5..e42c7b6 100644 --- a/customer/user.go +++ b/customer/user.go @@ -31,6 +31,7 @@ type UserItem struct { Id uint `json:"id"` Name string `json:"name"` Account string `json:"account"` + RateId uint `json:"rateId"` Liaison string `json:"liaison"` Phone string `json:"phone"` Amount decimal.Decimal `json:"amount"` @@ -152,9 +153,8 @@ func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply } type UserInfoItem struct { - Id uint `json:"id"` - Name string `json:"name"` - RateId uint `json:"rateId"` + Id uint `json:"id"` + Name string `json:"name"` } // FindByIds @Title 根据用户Ids查询用户信息 From 84c315414df5040bd85d74e3e47be0cacb91efb1 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 4 Nov 2022 15:50:25 +0800 Subject: [PATCH 52/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/goods.go b/supplier/goods.go index 72a2852..fcc415a 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -13,6 +13,7 @@ type GoodsSearch struct { Name string // 商品名称 CategoryId uint64 // 类目id BrandName string // 品牌名 + UpcCode string // 商品条码 Handle uint // 处理状态 1=待处理 2=入库 3=废弃 SkuId uint // 供应商skuId MinSupplyPrice decimal.Decimal // 最小采购价 From 346e0f727a217e753b3cb46c25e8eac992d3bbb3 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 4 Nov 2022 16:00:13 +0800 Subject: [PATCH 53/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/goods.go b/supplier/goods.go index fcc415a..bf8f9e6 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -33,6 +33,7 @@ type GoodsItem struct { BrandId uint `json:"brandId"` BrandName string `json:"brandName"` SkuItems []GoodsItemLists `json:"skuItems"` + UpcCodes []string `json:"upcCodes"` StockCount uint `json:"stockCount"` MinPrice decimal.Decimal `json:"minPrice"` GuidePrice decimal.Decimal `json:"guidePrice"` From f97c11a6c66742f27b53b786ff049323cc40e30a Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 4 Nov 2022 16:32:23 +0800 Subject: [PATCH 54/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/goods.go b/supplier/goods.go index bf8f9e6..18c8021 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -47,6 +47,7 @@ type GoodsItemLists struct { SupplyPrice decimal.Decimal `json:"supplyPrice"` GoodsId uint `json:"goodsId"` Img string `json:"img"` + UpcCode string `json:"upcCode"` } type GoodsSpecificationItem struct { From b52099f706d8cd8106522eba91208b6fb538d3cf Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 7 Nov 2022 16:50:10 +0800 Subject: [PATCH 55/64] =?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/channel/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/channel/order.go b/supply/channel/order.go index 60f1c80..279a381 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -137,6 +137,7 @@ func (o *order) Cancel(ctx context.Context, channelId string, args ArgsOrderChan } type OrderListsSearch struct { + SkuName string // 商品名称 Status []uint // 订单状态 CancelStatus uint // 订单取消状态 OrderSn string // 订单编号 From e371986081eca700b121ff53e20dea9ec042542c Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 7 Nov 2022 17:23:55 +0800 Subject: [PATCH 56/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/goods.go b/supplier/goods.go index 18c8021..dfc6cab 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -117,6 +117,7 @@ type SkuItem struct { TaxCode string `json:"taxCode"` Unit string `json:"uint"` Tax decimal.Decimal `json:"tax"` + Img string `json:"img"` } // Info @Title 商品详情 From e189a61c21a869c84702716dc9e1cff7efa89841 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 8 Nov 2022 10:48:55 +0800 Subject: [PATCH 57/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index dfc6cab..a803995 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -25,19 +25,19 @@ type ArgsGoodsList struct { } type GoodsItem struct { - Id uint `json:"id"` - Name string `json:"name"` - Img string `json:"img"` - GoodsNum string `json:"goodsNum"` - CategoryId uint `json:"categoryId"` - BrandId uint `json:"brandId"` - BrandName string `json:"brandName"` - SkuItems []GoodsItemLists `json:"skuItems"` - UpcCodes []string `json:"upcCodes"` - StockCount uint `json:"stockCount"` - MinPrice decimal.Decimal `json:"minPrice"` - GuidePrice decimal.Decimal `json:"guidePrice"` - CreatedAt int64 `json:"createdAt"` + Id uint `json:"id"` + Name string `json:"name"` + Img string `json:"img"` + GoodsNum string `json:"goodsNum"` + CategoryId uint `json:"categoryId"` + BrandId uint `json:"brandId"` + BrandName string `json:"brandName"` + SkuItems []GoodsItemLists `json:"skuItems"` + UpcCodes []string `json:"upcCodes"` + StockCount uint `json:"stockCount"` + GuidePrices []decimal.Decimal `json:"guidePrices"` + SupplyPrices []decimal.Decimal `json:"supplyPrices"` + CreatedAt int64 `json:"createdAt"` } type GoodsItemLists struct { From fd2534ca68f40ad36545550280546dac4dd55799 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 9 Nov 2022 15:13:11 +0800 Subject: [PATCH 58/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/goods.go b/supplier/goods.go index a803995..aa6311c 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -11,7 +11,7 @@ type goods struct { } type GoodsSearch struct { Name string // 商品名称 - CategoryId uint64 // 类目id + CategoryIds []uint // 类目id BrandName string // 品牌名 UpcCode string // 商品条码 Handle uint // 处理状态 1=待处理 2=入库 3=废弃 From be531e698cf45d1c1c0fa807d885995e6215f8fc Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 9 Nov 2022 15:22:56 +0800 Subject: [PATCH 59/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/goods.go b/supplier/goods.go index aa6311c..2550b79 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -11,7 +11,7 @@ type goods struct { } type GoodsSearch struct { Name string // 商品名称 - CategoryIds []uint // 类目id + CategoryId uint // 类目id BrandName string // 品牌名 UpcCode string // 商品条码 Handle uint // 处理状态 1=待处理 2=入库 3=废弃 From b55ae6da7cf11db775d0e094bf61d9efe666502e Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 9 Nov 2022 15:54:27 +0800 Subject: [PATCH 60/64] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/goods.go b/supplier/goods.go index 2550b79..aa6311c 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -11,7 +11,7 @@ type goods struct { } type GoodsSearch struct { Name string // 商品名称 - CategoryId uint // 类目id + CategoryIds []uint // 类目id BrandName string // 品牌名 UpcCode string // 商品条码 Handle uint // 处理状态 1=待处理 2=入库 3=废弃 From 897dbccd786bb87a70b8ca4013cd7c5ef40078b7 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 10 Nov 2022 17:07:47 +0800 Subject: [PATCH 61/64] =?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/order.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/supply/order.go b/supply/order.go index 03514d9..8afffba 100644 --- a/supply/order.go +++ b/supply/order.go @@ -144,6 +144,17 @@ func (o *order) Lists(ctx context.Context, args ArgsRetailOrderLists) (reply Rep return } +// Delivered @Title 订单签收 +func (o *order) Delivered(ctx context.Context, orderSn string) (err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Delivered", orderSn, &reply) + return +} + type OrderInfo struct { OrderId uint `json:"orderId"` CustomerId uint `json:"customerId"` From c45055ca1129f26f62549312ad417d9c3ae56a94 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 11 Nov 2022 11:24:45 +0800 Subject: [PATCH 62/64] =?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/order.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/supply/order.go b/supply/order.go index 8afffba..03514d9 100644 --- a/supply/order.go +++ b/supply/order.go @@ -144,17 +144,6 @@ func (o *order) Lists(ctx context.Context, args ArgsRetailOrderLists) (reply Rep return } -// Delivered @Title 订单签收 -func (o *order) Delivered(ctx context.Context, orderSn string) (err error) { - xClient, err := client.GetClient(o) - if err != nil { - return - } - reply := 0 - err = xClient.Call(ctx, "Delivered", orderSn, &reply) - return -} - type OrderInfo struct { OrderId uint `json:"orderId"` CustomerId uint `json:"customerId"` From 544f3b1f5efd9e0c9333d27d6e14091375db07d3 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 14 Nov 2022 10:00:38 +0800 Subject: [PATCH 63/64] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=AE=A2=E5=8D=95=E5=85=B3=E9=97=AD=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/order.go | 1 + supply/order.go | 1 + 2 files changed, 2 insertions(+) diff --git a/supply/channel/order.go b/supply/channel/order.go index 279a381..ea21030 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -166,6 +166,7 @@ type OrderItem struct { Status uint `json:"status"` CancelStatus uint `json:"cancelStatus"` CreatedAt int64 `json:"createdAt"` + CloseAt int64 `json:"closeAt"` Skus []OrderSku `json:"skus"` Packages []OrderPackage `json:"packages"` } diff --git a/supply/order.go b/supply/order.go index 03514d9..ed147da 100644 --- a/supply/order.go +++ b/supply/order.go @@ -127,6 +127,7 @@ type RetailOrderItem struct { SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` PayTime int64 `json:"payTime"` FinishAt int64 `json:"finishAt"` + CloseAt int64 `json:"closeAt"` } type ReplyRetailOrderLists struct { From 58aae25cab5f51c300d00f849eb441731e1ba184 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 14 Nov 2022 14:51:57 +0800 Subject: [PATCH 64/64] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customer/service/audit/supply.go b/customer/service/audit/supply.go index bcaed84..3113f90 100644 --- a/customer/service/audit/supply.go +++ b/customer/service/audit/supply.go @@ -12,7 +12,7 @@ type ArgsSupplyApply struct { ApplyUserId uint // 申请人id CustomerId uint // 客户id RateId uint // 费率id - ExpirationAt int64 // 到期时间 + ExpirationAt string // 到期时间 Enclosure string // 附件 }