添加京东下单接口

finance
杨赟 2 years ago
parent ad0b30d4cc
commit d614dde4ed

@ -11,6 +11,9 @@ const (
ErrorOrderShipment Error = 11005 // 无法配送 ErrorOrderShipment Error = 11005 // 无法配送
ErrorOrderSkuPrice Error = 11006 // 商品价格错误 ErrorOrderSkuPrice Error = 11006 // 商品价格错误
ErrorOrderAmount Error = 11007 // 订单金额错误 ErrorOrderAmount Error = 11007 // 订单金额错误
ErrorOrderLadingBill Error = 11008 // 订单已提单
ErrorOrderClose Error = 11009 // 订单已关闭
ErrorOrderTimeOut Error = 11010 // 订单超时
) )
var ErrorCodes = map[Error]string{ var ErrorCodes = map[Error]string{
@ -21,6 +24,9 @@ var ErrorCodes = map[Error]string{
ErrorOrderShipment: "无法配送", ErrorOrderShipment: "无法配送",
ErrorOrderSkuPrice: "商品价格错误", ErrorOrderSkuPrice: "商品价格错误",
ErrorOrderAmount: "订单金额错误", ErrorOrderAmount: "订单金额错误",
ErrorOrderLadingBill: "订单已提单",
ErrorOrderClose: "订单已关闭",
ErrorOrderTimeOut: "订单超时",
} }
func (e Error) Error() string { func (e Error) Error() string {

@ -10,6 +10,10 @@ type OrderInterface interface {
FreightFee(ctx context.Context, args ArgsOrderFreightFee, freightFee *decimal.Decimal) error FreightFee(ctx context.Context, args ArgsOrderFreightFee, freightFee *decimal.Decimal) error
// Submit 下单 // Submit 下单
Submit(ctx context.Context, args ArgsOrderSubmit, sourceOrderSn *string) error Submit(ctx context.Context, args ArgsOrderSubmit, sourceOrderSn *string) error
// LadingBill @Title 提单
LadingBill(ctx context.Context, orderSn string, reply *int) error
// Close @Title 关闭订单
Close(ctx context.Context, orderSn string, reply *int) error
} }
type ArgsOrderFreightFee struct { type ArgsOrderFreightFee struct {
Skus []OrderFreightFeeSkuItem // 商品信息 Skus []OrderFreightFeeSkuItem // 商品信息

Loading…
Cancel
Save