From 449923e9e9c7ddd9efd0e9ab3296c7d033b3b88e Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 23 May 2023 11:01:17 +0800 Subject: [PATCH 1/5] =?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 2/5] =?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 3/5] =?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 4/5] =?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 5/5] =?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 +}