You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
package _interface
|
|
|
|
import (
|
|
"context"
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type OrderInterface interface {
|
|
// FreightFee 获取运费
|
|
FreightFee(ctx context.Context, args ArgsOrderFreightFee, freightFee *decimal.Decimal) error
|
|
// Submit 下单
|
|
Submit(ctx context.Context, args ArgsOrderSubmit, sourceOrderSn *string) error
|
|
}
|
|
type ArgsOrderFreightFee struct {
|
|
Skus []OrderFreightFeeSkuItem // 商品信息
|
|
Address string // 地址
|
|
}
|
|
|
|
type OrderFreightFeeSkuItem struct {
|
|
SourceSkuId string // 源skuId
|
|
SourceSkuPrice decimal.Decimal // 采购价
|
|
Quantity uint // 数量
|
|
}
|
|
|
|
type ArgsOrderSubmit struct {
|
|
OrderSn uint64 // 订单号
|
|
Skus []OrderFreightFeeSkuItem // 商品信息
|
|
Address string // 地址
|
|
FreightFee decimal.Decimal // 运费
|
|
Receiver OrderReceiver // 收件信息
|
|
UserIp string // 用户ip
|
|
}
|
|
|
|
type OrderReceiver struct {
|
|
Name string // 姓名
|
|
Phone string // 手机号
|
|
Email string // 邮件
|
|
ZipCode string // 邮编
|
|
}
|