From b30b62afc5a13c9cf90e19283b3cf600ac171518 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 12 Oct 2022 15:29:54 +0800 Subject: [PATCH] =?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 +}