parent
9c5ff3d82f
commit
d89ac6af57
@ -0,0 +1,5 @@
|
|||||||
|
package channel
|
||||||
|
|
||||||
|
type Channel struct {
|
||||||
|
Sku sku
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package channel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"git.oa00.com/supply-chain/service/client"
|
||||||
|
"github.com/shopspring/decimal"
|
||||||
|
)
|
||||||
|
|
||||||
|
type order struct {
|
||||||
|
}
|
||||||
|
type ArgsOrderFreightFee struct {
|
||||||
|
Address string // 地址
|
||||||
|
Skus []SkuFreightFeeItem // sku信息
|
||||||
|
}
|
||||||
|
|
||||||
|
type SkuFreightFeeItem struct {
|
||||||
|
SkuId uint // skuId
|
||||||
|
Price decimal.Decimal // 价格
|
||||||
|
Quantity uint // 数量
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReplyOrderFreightFee struct {
|
||||||
|
SkuIds []uint `json:"skuIds"`
|
||||||
|
FreightFee decimal.Decimal `json:"freightFee"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// FreightFee @Title 获取运费
|
||||||
|
func (o *order) FreightFee(ctx context.Context, args ArgsOrderFreightFee) (reply []ReplyOrderFreightFee, err error) {
|
||||||
|
err = client.GetClient(o).Call(ctx, "FreightFee", args, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
type ArgsOrderSubmit struct {
|
||||||
|
Address string // 地址
|
||||||
|
Skus []SkuFreightFeeItem // sku信息
|
||||||
|
Receiver Receiver // 收件信息
|
||||||
|
OrderFee decimal.Decimal // 订单金额-不含运费
|
||||||
|
FreightFee decimal.Decimal // 运费
|
||||||
|
UserIp string // 下单用户ip
|
||||||
|
}
|
||||||
|
|
||||||
|
type Receiver struct {
|
||||||
|
Name string // 姓名
|
||||||
|
Mobile string // 手机号
|
||||||
|
Email string // 邮箱
|
||||||
|
ZipCode string // 邮编
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReplyOrderSubmit struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Submit @Title 下单
|
||||||
|
func (o *order) Submit(ctx context.Context, args ArgsOrderSubmit) (reply []ReplyOrderSubmit, err error) {
|
||||||
|
err = client.GetClient(o).Call(ctx, "Submit", args, &reply)
|
||||||
|
return
|
||||||
|
}
|
@ -1,5 +0,0 @@
|
|||||||
package customer
|
|
||||||
|
|
||||||
type Customer struct {
|
|
||||||
Sku sku
|
|
||||||
}
|
|
@ -1,11 +1,11 @@
|
|||||||
package supply
|
package supply
|
||||||
|
|
||||||
import "git.oa00.com/supply-chain/service/supply/customer"
|
import "git.oa00.com/supply-chain/service/supply/channel"
|
||||||
|
|
||||||
type Supply struct {
|
type Supply struct {
|
||||||
Brand brand
|
Brand brand
|
||||||
Category category
|
Category category
|
||||||
Sku sku
|
Sku sku
|
||||||
SkuAudit skuAudit
|
SkuAudit skuAudit
|
||||||
Customer customer.Customer
|
Channel channel.Channel
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue