finance
黄伟 2 years ago
parent 1722e13510
commit b8f4236e46

@ -186,3 +186,14 @@ func (o *order) SubDetail(ctx context.Context, channelId, orderSn string) (reply
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "SubDetail", orderSn, &reply) err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "SubDetail", orderSn, &reply)
return return
} }
// Finish @Title 确认收货
func (o *order) Finish(ctx context.Context, channelId, orderSn string) error {
xClient, err := client.GetClient(o)
if err != nil {
return err
}
reply := 0
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Finish", orderSn, &reply)
return err
}

@ -140,15 +140,17 @@ type ReplyOrderLists struct {
} }
type OrderItem struct { type OrderItem struct {
OrderSubSn string Id uint
Status uint OrderSubSn string
CancelStatus uint SourceOrderSn string
OrderFee decimal.Decimal Status uint
FreightFee decimal.Decimal CancelStatus uint
CreatedAt int64 OrderFee decimal.Decimal
PayAt int64 FreightFee decimal.Decimal
CloseAt int64 CreatedAt int64
FinishAt int64 PayAt int64
CloseAt int64
FinishAt int64
} }
// Lists @Title 订单列表 // Lists @Title 订单列表
@ -160,3 +162,46 @@ func (o *order) Lists(ctx context.Context, args ArgsOrderLists) (reply ReplyOrde
err = xClient.Call(ctx, "Lists", args, &reply) err = xClient.Call(ctx, "Lists", args, &reply)
return return
} }
type ReplyOrderInfo struct {
Id uint
Status uint
CancelStatus uint
OrderSunSu string
SourceOrderSn string
CreatedAt int64
PayAt int64
CloseAt int64
FinishAt int64
OrderFee decimal.Decimal
FreightFee decimal.Decimal
Skus []OrderSkuItem
Customer Customer
ReceiverName string
ReceiverMobile string
Address string
}
type Customer struct {
Name string
Phone string
HopeStockOutAt int64 // 期望发货时间
}
type OrderSkuItem struct {
Img string
Name string
SkuId uint
Price decimal.Decimal
Quantity uint
}
// Info @Title 订单列表
func (o *order) Info(ctx context.Context, orderSubSn uint64) (reply ReplyOrderInfo, err error) {
xClient, err := client.GetClient(o)
if err != nil {
return ReplyOrderInfo{}, err
}
err = xClient.Call(ctx, "Info", orderSubSn, &reply)
return
}

Loading…
Cancel
Save