修改参数

finance
杨赟 2 years ago
parent 7adca6f8a4
commit 413e2b0d9c

@ -6,17 +6,21 @@ const (
ErrorSystem Error = 11001 // 系统错误
ErrorOrderRepeat Error = 11002 // 重复下单
ErrorOrderFreightFee Error = 11003 // 运费获取失败
ErrorOrderFreightFee Error = 11003 // 运费错误
ErrorOrderSubmit Error = 11004 // 下单失败
ErrorOrderShipment Error = 11005 // 无法配送
ErrorOrderSkuPrice Error = 11006 // 商品价格错误
ErrorOrderAmount Error = 11007 // 订单金额错误
)
var ErrorCodes = map[Error]string{
ErrorSystem: "系统错误",
ErrorOrderRepeat: "重复下单",
ErrorOrderFreightFee: "运费获取失败",
ErrorOrderFreightFee: "运费错误",
ErrorOrderSubmit: "下单失败",
ErrorOrderShipment: "无法配送",
ErrorOrderSkuPrice: "商品价格错误",
ErrorOrderAmount: "订单金额错误",
}
func (e Error) Error() string {

@ -41,15 +41,25 @@ func (o *order) FreightFee(ctx context.Context, channelId string, args ArgsOrder
return
}
type SkuOrderItem struct {
SkuId uint // skuId
Price decimal.Decimal // 单价
Quantity uint // 数量
}
type ArgsOrderSubmit struct {
Address string // 地址
Skus []SkuFreightFeeItem // sku信息
Skus []SkuOrderItem // sku信息
Receiver Receiver // 收件信息
OrderFee decimal.Decimal // 订单金额-不含运费
FreightFee decimal.Decimal // 运费
FreightFees []OrderFreightFee // 运费
UserIp string // 下单用户ip
}
type OrderFreightFee struct {
SkuIds []uint `json:"skuIds"`
FreightFee decimal.Decimal `json:"freightFee"`
}
type Receiver struct {
Name string // 姓名
Mobile string // 手机号

@ -26,6 +26,7 @@ type ArgsOrderSubmit struct {
OrderSn uint64 // 订单号
Skus []OrderFreightFeeSkuItem // 商品信息
Address string // 地址
FreightFee decimal.Decimal // 运费
Receiver OrderReceiver // 收件信息
UserIp string // 用户ip
}

Loading…
Cancel
Save