From 44ef53f35e92eeed65dad8f2fe03a083c5ebf61d Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 14 Oct 2022 10:37:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/afterService.go | 31 +++++++++++++++++++++++++++++++ supply/channel/mq.go | 6 +++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/supply/channel/afterService.go b/supply/channel/afterService.go index 8cffd15..66dfbbb 100644 --- a/supply/channel/afterService.go +++ b/supply/channel/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" "github.com/smallnest/rpcx/share" ) @@ -161,6 +162,7 @@ type AfterServiceItem struct { Quantity uint `json:"quantity"` TypeReasonName string `json:"typeReasonName"` OrderSubId uint `json:"orderSubId"` + Result string `json:"result"` Status uint `json:"status"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` @@ -175,3 +177,32 @@ func (a *afterService) Lists(ctx context.Context, channelId string, args ArgsAft err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Lists", args, &reply) return } + +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"` +} + +// Detail @Title 售后详情 +func (a *afterService) Detail(ctx context.Context, channelId string, afsSn string) (reply ReplyAfterServiceDetail, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Detail", afsSn, &reply) + return +} diff --git a/supply/channel/mq.go b/supply/channel/mq.go index 28ccbee..22b44c2 100644 --- a/supply/channel/mq.go +++ b/supply/channel/mq.go @@ -6,9 +6,13 @@ import ( "github.com/smallnest/rpcx/share" ) +const ( + MqSubscribeNameSkuPriceChange = "sku_price_change" // sku价格变动 + MqSubscribeNameSkuChange = "sku_change" // sku信息变动 +) + type mq struct { } - type ArgsMqSubscribe struct { Name string // 队列名称 } From 458891ec8f08be4bbd8ee60c11a5a586bb6fe609 Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 14 Oct 2022 10:47:33 +0800 Subject: [PATCH 2/2] =?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/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supply/order.go b/supply/order.go index 2120c5a..ad0fcc6 100644 --- a/supply/order.go +++ b/supply/order.go @@ -118,7 +118,7 @@ type RetailOrderSearch struct { type RetailOrderItem struct { Id uint `json:"id"` - OrderSubSn uint64 `json:"orderSubSn"` + OrderSubSn string `json:"orderSubSn"` SourceName string `json:"sourceName"` CustomerName string `json:"customerName"` OrderStatus uint `json:"orderStatus"`