From 23503d04f55f80b9c051c7dc8cd56dc787de4a2d Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 8 Oct 2022 13:19:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=94=AE=E5=90=8E=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/afterService.go | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 supply/afterService.go diff --git a/supply/afterService.go b/supply/afterService.go new file mode 100644 index 0000000..fc82f38 --- /dev/null +++ b/supply/afterService.go @@ -0,0 +1,53 @@ +package supply + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" +) + +type afterService struct { +} + +type ArgsRetailHistory struct { + Search RetailHistorySearch + Page bean.Page +} + +type RetailHistorySearch struct { + AfterServiceSn string `label:"售后单号"` + OrderSn string `label:"订单号"` + Status uint `label:"售后状态"` + SourceId uint `label:"所属供应商"` + CustomerId uint `label:"所属客户"` + CreateStartDate string `label:"创建开始日期"` + CreateEndDate string `label:"创建结束日期"` +} + +type RetailHistoryItem struct { + AfterServiceSn uint64 `json:"afterServiceSn"` + OrderSn uint64 `json:"orderSn"` + Name string `json:"name"` + Quantity uint `json:"quantity"` + Status uint `json:"status"` + Reason string `json:"reason"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` + Source string `json:"source"` + CustomerId uint `json:"customerId"` +} + +type ReplyRetailHistory struct { + Lists []RetailHistoryItem `json:"lists"` + Total int64 `json:"total"` +} + +// RetailHistory @Title 零售订单售后记录 +func (a *afterService) RetailHistory(ctx context.Context, args ArgsRetailHistory) (reply ReplyRetailHistory, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return ReplyRetailHistory{}, err + } + err = xClient.Call(ctx, "RetailHistory", args, &reply) + return +}