diff --git a/customer/user.go b/customer/user.go index c319df4..432b23e 100644 --- a/customer/user.go +++ b/customer/user.go @@ -150,3 +150,18 @@ func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply err = xClient.Call(ctx, "ServiceInfo", args, &reply) return } + +type UserInfoItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// FindByIds @Title 根据用户Ids查询用户信息 +func (u *user) FindByIds(ctx context.Context, userIds []uint) (reply []UserInfoItem, err error) { + xClient, err := client.GetClient(u) + if err != nil { + return + } + err = xClient.Call(ctx, "FindByIds", userIds, &reply) + return +} diff --git a/supply/order.go b/supply/order.go index ce5585e..03716a6 100644 --- a/supply/order.go +++ b/supply/order.go @@ -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 +} diff --git a/supply/source.go b/supply/source.go index 96cdc58..00abed6 100644 --- a/supply/source.go +++ b/supply/source.go @@ -1,9 +1,30 @@ package supply -type Source struct { +import ( + "context" + "git.oa00.com/supply-chain/service/client" +) + +type sourceRpc struct { Id uint `gorm:"primaryKey"` Name string // 供货商名称 Base string // rpc服务基础名称 SkuName string // sku名称 OrderName string // order名称 } + +type SourceItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// Select @Title 订单列表 +func (s *sourceRpc) Select(ctx context.Context) (reply []SourceItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + args := 0 + err = xClient.Call(ctx, "Select", args, &reply) + return +} diff --git a/supply/supply.go b/supply/supply.go index 542bcd3..94da827 100644 --- a/supply/supply.go +++ b/supply/supply.go @@ -13,4 +13,5 @@ type Supply struct { Channel channel.Channel Setting setting.Setting Order order + Source sourceRpc }