diff --git a/wholesale/order.go b/wholesale/order.go index 3ba69f9..a95d460 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -3,6 +3,7 @@ package wholesale import ( "context" "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" "github.com/shopspring/decimal" ) @@ -117,3 +118,45 @@ func (o *order) Finish(ctx context.Context, args ArgsOrderFinish) (err error) { err = xClient.Call(ctx, "Finish", args, &reply) return } + +type ArgsOrderLists struct { + Search OrderSearch + Page bean.Page +} + +type OrderSearch struct { + OrderSubSn string + Status uint + CancelStatus uint + CreatedStartDate string + CreatedEndDate string + PayStartDate string + PayEndDate string +} + +type ReplyOrderLists struct { + Lists []OrderItem + Total int64 +} + +type OrderItem struct { + OrderSubSn string + Status uint + CancelStatus uint + OrderFee decimal.Decimal + FreightFee decimal.Decimal + CreatedAt int64 + PayAt int64 + CloseAt int64 + FinishAt int64 +} + +// Lists @Title 订单列表 +func (o *order) Lists(ctx context.Context, args ArgsOrderLists) (reply ReplyOrderLists, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return ReplyOrderLists{}, err + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +}