From 2a889adcc81a34f6470fd8829a65532119931cd4 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 8 May 2023 15:17:46 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= 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 e0007d6..9260789 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -198,6 +198,7 @@ type SkuEsSearch struct { SkuId uint // Sku编码 SupplySkuId uint // 供应商Sku编码 SkuName string // 商品名称 + SkuNameVague string // 商品名称-模糊查询 UpcCode string // 商品条码 BrandId uint // 品牌id BrandName string // 品牌名称 全词匹配 From 449923e9e9c7ddd9efd0e9ab3296c7d033b3b88e Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 23 May 2023 11:01:17 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/mq.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wholesale/channel/mq.go b/wholesale/channel/mq.go index 91f8e57..66d9f8c 100644 --- a/wholesale/channel/mq.go +++ b/wholesale/channel/mq.go @@ -7,8 +7,9 @@ import ( ) const ( - MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 - MqSubscribeNameSkuChange = "sku_change" // sku信息变动 + MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 + MqSubscribeNameSkuChange = "sku_change" // sku信息变动 + MqSubscribeNameOrderFreightFee = "order_freight_fee" // 运费处理完成 ) type mq struct { From b039533017690ae222de7799d38f12aac7a44458 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 24 May 2023 15:46:55 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/mq.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/mq.go b/wholesale/channel/mq.go index 66d9f8c..cd475a4 100644 --- a/wholesale/channel/mq.go +++ b/wholesale/channel/mq.go @@ -10,6 +10,7 @@ const ( MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 MqSubscribeNameSkuChange = "sku_change" // sku信息变动 MqSubscribeNameOrderFreightFee = "order_freight_fee" // 运费处理完成 + MqSubscribeNameOrderSplit = "order_split" // 拆单 ) type mq struct { From 2b69b5282c949396e2ec6fdf2f4c3728ce19c24b Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 25 May 2023 10:42:27 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/mq.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/mq.go b/wholesale/channel/mq.go index cd475a4..9449d14 100644 --- a/wholesale/channel/mq.go +++ b/wholesale/channel/mq.go @@ -11,6 +11,7 @@ const ( MqSubscribeNameSkuChange = "sku_change" // sku信息变动 MqSubscribeNameOrderFreightFee = "order_freight_fee" // 运费处理完成 MqSubscribeNameOrderSplit = "order_split" // 拆单 + MqSubscribeNameOrderStockOut = "order_stock_out" // 订单出库 ) type mq struct { From f9afc8d7eff15481080f9361e1e0c4bca2c2e816 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 25 May 2023 10:47:45 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/mq.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wholesale/channel/mq.go b/wholesale/channel/mq.go index 9449d14..bc12fca 100644 --- a/wholesale/channel/mq.go +++ b/wholesale/channel/mq.go @@ -12,6 +12,8 @@ const ( MqSubscribeNameOrderFreightFee = "order_freight_fee" // 运费处理完成 MqSubscribeNameOrderSplit = "order_split" // 拆单 MqSubscribeNameOrderStockOut = "order_stock_out" // 订单出库 + MqSubscribeNameOrderFinish = "order_finish" // 订单完成 + MqSubscribeNameOrderCancel = "order_cancel" // 订单取消 ) type mq struct { From 36bedabe8c0dcab00fe18b60d3644c852533d649 Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 6 Jun 2023 16:11:04 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B6=88=E8=B4=B9?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/user/user.go | 11 ++++--- customer/user/walletHistory.go | 57 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 customer/user/walletHistory.go diff --git a/customer/user/user.go b/customer/user/user.go index e9440b0..07fff2d 100644 --- a/customer/user/user.go +++ b/customer/user/user.go @@ -1,9 +1,10 @@ package user type User struct { - Deposit deposit // 充值 - DepositAudit depositAudit // 充值审核 - Wallet wallet // 钱包 - Cash cash // 余额提现 - Message message // 消息 + Deposit deposit // 充值 + DepositAudit depositAudit // 充值审核 + Wallet wallet // 钱包 + Cash cash // 余额提现 + Message message // 消息 + WalletHistory walletHistory // 消费记录 } diff --git a/customer/user/walletHistory.go b/customer/user/walletHistory.go new file mode 100644 index 0000000..0a19c41 --- /dev/null +++ b/customer/user/walletHistory.go @@ -0,0 +1,57 @@ +package user + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" + "github.com/shopspring/decimal" +) + +type walletHistory struct { +} + +const ( + WalletHistoryOrderIdAsc = 1 // 排序 id正序 + WalletHistoryOrderIdDesc = 2 // 排序 id 倒序 +) + +type ArgsWalletHistoryLists struct { + Search WalletHistorySearch + Page bean.Page + Orders []uint +} + +type WalletHistorySearch struct { + StartTime string // 格式 2006-01-02 15:04:05 开始时间 + EndTime string // 格式 2006-01-02 15:04:05 截止时间 +} + +type ReplyWalletHistoryList struct { + Lists []WalletHistoryItem `json:"lists"` + Total int64 `json:"total"` +} +type WalletHistoryItem struct { + Id uint `json:"id"` + UserId uint `json:"userId"` + UserName string `json:"userName"` + Type uint `json:"type"` + Title string `json:"title"` + BeforeAmount decimal.Decimal `json:"beforeAmount"` + Amount decimal.Decimal `json:"amount"` + AfterAmount decimal.Decimal `json:"afterAmount"` + TradeChannel string `json:"tradeChannel"` + TradeSerialSn string `json:"tradeSerialSn"` + Remark string `json:"remark"` + ServiceId uint `json:"serviceId"` + CreatedAt int64 `json:"createdAt"` +} + +// Lists @Title 消费记录 +func (w *walletHistory) Lists(ctx context.Context, args ArgsWalletHistoryLists) (reply ReplyWalletHistoryList, err error) { + xClient, err := client.GetClient(w) + if err != nil { + return + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +} From ff306e5171cd397875084012113cc2734f5eb935 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 8 Jun 2023 14:40:08 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/supply/order.go b/supply/order.go index 571a281..e827dfb 100644 --- a/supply/order.go +++ b/supply/order.go @@ -140,18 +140,19 @@ type RetailOrderSearch struct { type RetailOrderItem struct { Id uint `json:"id"` - OrderSubSn string `json:"orderSubSn"` - SourceOrderSn string `json:"sourceOrderSn"` - SourceName string `json:"sourceName"` - CustomerName string `json:"customerName"` - OrderStatus uint `json:"orderStatus"` - OrderFee decimal.Decimal `json:"orderFee"` - FreightFee decimal.Decimal `json:"freightFee"` - SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` - PayTime int64 `json:"payTime"` - FinishAt int64 `json:"finishAt"` - CloseAt int64 `json:"closeAt"` - StockOutAt int64 `json:"stockOutAt"` + OrderSn string `json:"orderSn"` // 原始订单号 + OrderSubSn string `json:"orderSubSn"` // 订单号 + SourceOrderSn string `json:"sourceOrderSn"` // 供应商订单号 + SourceName string `json:"sourceName"` // 供应商名称 + CustomerName string `json:"customerName"` // 客户名称 + OrderStatus uint `json:"orderStatus"` // 订单状态 + OrderFee decimal.Decimal `json:"orderFee"` // 订单金额 + FreightFee decimal.Decimal `json:"freightFee"` // 运费 + SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` // 供应商订单金额 + PayTime int64 `json:"payTime"` // 支付时间 + FinishAt int64 `json:"finishAt"` // 完成时间 + CloseAt int64 `json:"closeAt"` // 关闭时间 + StockOutAt int64 `json:"stockOutAt"` // 发货时间 } type ReplyRetailOrderLists struct { From 1df23f89ca5288c1c0aa1eb14b82d91501a1eaa2 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 8 Jun 2023 14:59:29 +0800 Subject: [PATCH 08/10] =?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 | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/supply/order.go b/supply/order.go index e827dfb..c80b6a9 100644 --- a/supply/order.go +++ b/supply/order.go @@ -139,20 +139,28 @@ type RetailOrderSearch struct { } type RetailOrderItem struct { - Id uint `json:"id"` - OrderSn string `json:"orderSn"` // 原始订单号 - OrderSubSn string `json:"orderSubSn"` // 订单号 - SourceOrderSn string `json:"sourceOrderSn"` // 供应商订单号 - SourceName string `json:"sourceName"` // 供应商名称 - CustomerName string `json:"customerName"` // 客户名称 - OrderStatus uint `json:"orderStatus"` // 订单状态 - OrderFee decimal.Decimal `json:"orderFee"` // 订单金额 - FreightFee decimal.Decimal `json:"freightFee"` // 运费 - SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` // 供应商订单金额 - PayTime int64 `json:"payTime"` // 支付时间 - FinishAt int64 `json:"finishAt"` // 完成时间 - CloseAt int64 `json:"closeAt"` // 关闭时间 - StockOutAt int64 `json:"stockOutAt"` // 发货时间 + Id uint `json:"id"` + OrderSn string `json:"orderSn"` // 原始订单号 + OrderSubSn string `json:"orderSubSn"` // 订单号 + SourceOrderSn string `json:"sourceOrderSn"` // 供应商订单号 + SourceName string `json:"sourceName"` // 供应商名称 + CustomerName string `json:"customerName"` // 客户名称 + OrderStatus uint `json:"orderStatus"` // 订单状态 + OrderFee decimal.Decimal `json:"orderFee"` // 订单金额 + FreightFee decimal.Decimal `json:"freightFee"` // 运费 + SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` // 供应商订单金额 + PayTime int64 `json:"payTime"` // 支付时间 + FinishAt int64 `json:"finishAt"` // 完成时间 + CloseAt int64 `json:"closeAt"` // 关闭时间 + StockOutAt int64 `json:"stockOutAt"` // 发货时间 + SkuIds []RetailOrderSubSkuItem `json:"skuIds"` // 商品id +} + +type RetailOrderSubSkuItem struct { + SkuId uint `json:"skuId"` // skuId + SourceSkuId uint `json:"sourceSkuId"` // 供应商skuId + Quality uint `json:"quality"` // 数量 + SupplyPrice decimal.Decimal `json:"supplyPrice"` // 采购价 } type ReplyRetailOrderLists struct { From ced9477531c3c7c4f297ab470346d3320db6cae7 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 8 Jun 2023 15:00:42 +0800 Subject: [PATCH 09/10] =?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, 1 insertion(+), 1 deletion(-) diff --git a/supply/order.go b/supply/order.go index c80b6a9..579bc99 100644 --- a/supply/order.go +++ b/supply/order.go @@ -153,7 +153,7 @@ type RetailOrderItem struct { FinishAt int64 `json:"finishAt"` // 完成时间 CloseAt int64 `json:"closeAt"` // 关闭时间 StockOutAt int64 `json:"stockOutAt"` // 发货时间 - SkuIds []RetailOrderSubSkuItem `json:"skuIds"` // 商品id + Skus []RetailOrderSubSkuItem `json:"skus"` // 商品id } type RetailOrderSubSkuItem struct { From a274cca9920ba7cc8fc40f41d39b7488e07ed276 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 8 Jun 2023 15:15:33 +0800 Subject: [PATCH 10/10] =?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 | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/supply/order.go b/supply/order.go index 579bc99..ed19fe8 100644 --- a/supply/order.go +++ b/supply/order.go @@ -139,28 +139,19 @@ type RetailOrderSearch struct { } type RetailOrderItem struct { - Id uint `json:"id"` - OrderSn string `json:"orderSn"` // 原始订单号 - OrderSubSn string `json:"orderSubSn"` // 订单号 - SourceOrderSn string `json:"sourceOrderSn"` // 供应商订单号 - SourceName string `json:"sourceName"` // 供应商名称 - CustomerName string `json:"customerName"` // 客户名称 - OrderStatus uint `json:"orderStatus"` // 订单状态 - OrderFee decimal.Decimal `json:"orderFee"` // 订单金额 - FreightFee decimal.Decimal `json:"freightFee"` // 运费 - SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` // 供应商订单金额 - PayTime int64 `json:"payTime"` // 支付时间 - FinishAt int64 `json:"finishAt"` // 完成时间 - CloseAt int64 `json:"closeAt"` // 关闭时间 - StockOutAt int64 `json:"stockOutAt"` // 发货时间 - Skus []RetailOrderSubSkuItem `json:"skus"` // 商品id -} - -type RetailOrderSubSkuItem struct { - SkuId uint `json:"skuId"` // skuId - SourceSkuId uint `json:"sourceSkuId"` // 供应商skuId - Quality uint `json:"quality"` // 数量 - SupplyPrice decimal.Decimal `json:"supplyPrice"` // 采购价 + Id uint `json:"id"` + OrderSubSn string `json:"orderSubSn"` // 订单号 + SourceOrderSn string `json:"sourceOrderSn"` // 供应商订单号 + SourceName string `json:"sourceName"` // 供应商名称 + CustomerName string `json:"customerName"` // 客户名称 + OrderStatus uint `json:"orderStatus"` // 订单状态 + OrderFee decimal.Decimal `json:"orderFee"` // 订单金额 + FreightFee decimal.Decimal `json:"freightFee"` // 运费 + SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` // 供应商订单金额 + PayTime int64 `json:"payTime"` // 支付时间 + FinishAt int64 `json:"finishAt"` // 完成时间 + CloseAt int64 `json:"closeAt"` // 关闭时间 + StockOutAt int64 `json:"stockOutAt"` // 发货时间 } type ReplyRetailOrderLists struct {