添加订单列表rpc接口

finance
黄伟 2 years ago
parent c06b19260b
commit 74831e49b1

@ -3,6 +3,7 @@ package supply
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
"github.com/shopspring/decimal"
)
@ -97,3 +98,50 @@ func (o *order) Finish(ctx context.Context, args ArgsOrderFinish) (err error) {
err = xClient.Call(ctx, "Finish", args, &reply)
return
}
type ArgsRetailOrderLists struct {
Search RetailOrderSearch
Page bean.Page
}
type RetailOrderSearch struct {
OrderSubSn uint64 `label:"订单号"`
SupplierId uint `label:"供应商"`
CustomerId uint `label:"客户"`
WaybillCode string `label:"运单号"`
Status uint `label:"订单状态"`
PayStartDate string `label:"支付开始日期"`
PayEndDate string `label:"支付结束日期"`
FinishStartDate string `label:"完成开始日期"`
FinishEndDate string `label:"完成结束日期"`
}
type RetailOrderItem struct {
Id uint `json:"id"`
OrderSubSn uint64 `json:"orderSubSn"`
SourceName string `json:"sourceName"`
CustomerName string `json:"customerName"`
OrderStatus uint `json:"orderStatus"`
LogisticsName string `json:"logisticsName"`
WaybillCode string `json:"waybillCode"`
OrderFee decimal.Decimal `json:"orderFee"`
FreightFee decimal.Decimal `json:"freightFee"`
SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"`
PayTime int64 `json:"payTime"`
FinishAt int64 `json:"finishAt"`
}
type ReplyRetailOrderLists struct {
Lists []RetailOrderItem `json:"lists"`
Total int64 `json:"total"`
}
// Lists @Title 订单列表
func (o *order) Lists(ctx context.Context, args ArgsRetailOrderLists) (reply ReplyRetailOrderLists, err error) {
xClient, err := client.GetClient(o)
if err != nil {
return
}
err = xClient.Call(ctx, "Lists", args, &reply)
return
}

Loading…
Cancel
Save