From e84601ed6db6142cd18238a8ce1818b6bc3a9a65 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 12 Oct 2022 14:40:19 +0800 Subject: [PATCH 1/2] =?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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/supply/order.go b/supply/order.go index ca669d2..97d2586 100644 --- a/supply/order.go +++ b/supply/order.go @@ -168,6 +168,9 @@ type OrderSku struct { Name string `json:"name"` SupplyPrice decimal.Decimal `json:"supplyPrice"` Rate decimal.Decimal `json:"rate"` + Price decimal.Decimal `json:"price"` + AdjustPrice decimal.Decimal `json:"adjustPrice"` + Amount decimal.Decimal `json:"amount"` ImgUrl string `json:"imgUrl"` Quantity uint `json:"quantity"` } From b30b62afc5a13c9cf90e19283b3cf600ac171518 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 12 Oct 2022 15:29:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/afterService.go | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/supply/channel/afterService.go b/supply/channel/afterService.go index 6d85374..8cffd15 100644 --- a/supply/channel/afterService.go +++ b/supply/channel/afterService.go @@ -3,6 +3,7 @@ package channel import ( "context" "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" "github.com/smallnest/rpcx/share" ) @@ -134,3 +135,43 @@ func (a *afterService) Cancel(ctx context.Context, channelId string, afterServic err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Cancel", afterServiceSn, &reply) return } + +type AfterServiceSearch struct { + Name string // 商品名称 + OrderSn string // 订单单号 + AfsSn string // 售后单号 + CreatedDateStart string // 售后日期开始 + CreatedDateEnd string // 售后日期结束 +} +type ArgsAfterServiceLists struct { + Search AfterServiceSearch + Page bean.Page +} +type ReplyAfterServiceLists struct { + Lists []AfterServiceItem `json:"lists"` + Total int64 `json:"total"` +} + +type AfterServiceItem struct { + Id uint `json:"id"` + AfsSn string `json:"afsSn"` + OrderSubSn string `json:"orderSubSn"` + Name string `json:"name"` + ImgUrl string `json:"imgUrl"` + Quantity uint `json:"quantity"` + TypeReasonName string `json:"typeReasonName"` + OrderSubId uint `json:"orderSubId"` + Status uint `json:"status"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` +} + +// Lists @Title 售后列表 +func (a *afterService) Lists(ctx context.Context, channelId string, args ArgsAfterServiceLists) (reply ReplyAfterServiceLists, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Lists", args, &reply) + return +}