Documentation ¶
Overview ¶
*
- Copyright 2015 @ 56x.net.
- name : shipment
- author : jarryliu
- date : 2016-07-15 08:19
- description :
- history :
Index ¶
Constants ¶
View Source
const ( // 等待发货 StatAwaitingShipment = 1 + iota // 已发货 StatShipped // 已完成 StatCompleted )
Variables ¶
View Source
var (
ErrMissingSpInfo = domain.NewError(
"err_shipment_missing_spinfo", "物流信息不完整、无法进行发货!",
)
)
Functions ¶
This section is empty.
Types ¶
type IShipmentOrder ¶
type IShipmentRepo ¶
type IShipmentRepo interface { // 创建发货单 CreateShipmentOrder(o *ShipmentOrder) IShipmentOrder // 获取发货单 GetShipmentOrder(id int64) IShipmentOrder // 获取订单对应的发货单 GetShipOrders(orderId int64, sub bool) []IShipmentOrder // 保存发货单 SaveShipmentOrder(o *ShipmentOrder) (int, error) // 保存发货商品项 SaveShipmentItem(v *ShipmentItem) (int, error) // 删除发货单 DeleteShipmentOrder(id int64) error }
type ShipOrderTrack ¶
type ShipOrderTrack struct { // 物流单号 LogisticCode string // 承运商名称 ShipperName string // 承运商代码 ShipperCode string // 发货状态 ShipState string // 更新时间 UpdateTime int64 // 包含发货单流 Flows []*ShipFlow }
发货单追踪
type ShipmentItem ¶
type ShipmentItem struct { // 编号 ID int64 `db:"id" pk:"yes" auto:"yes"` // 发货单编号 ShipOrder int64 `db:"ship_order"` // 商品交易快照编号 SnapshotId int64 `db:"snapshot_id"` // 商品数量 Quantity int32 `db:"quantity"` // 运费 Amount float64 `db:"amount"` // 实际运费 FinalAmount float64 `db:"final_amount"` }
发货单详情
type ShipmentOrder ¶
type ShipmentOrder struct { // 编号 ID int64 `db:"id" pk:"yes" auto:"yes"` // 订单编号 OrderId int64 `db:"order_id"` // 子订单编号 SubOrderId int64 `db:"sub_orderid"` // 快递SP编号 SpId int32 `db:"sp_id"` // 快递SP单号 SpOrder string `db:"sp_order"` // 物流日志 ShipmentLog string `db:"shipment_log"` // 运费 Amount float64 `db:"amount"` // 实际运费 FinalAmount float64 `db:"final_amount"` // 发货时间 ShipTime int64 `db:"ship_time"` // 状态 State int `db:"state"` // 更新时间 UpdateTime int64 `db:"update_time"` // 配送项目 Items []*ShipmentItem `db:"-"` }
发货单
Click to show internal directories.
Click to hide internal directories.