shipment

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2023 License: GPL-2.0 Imports: 2 Imported by: 0

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 IShipmentOrder interface {
	// 获取聚合根编号
	GetAggregateRootId() int64
	// 获取值
	Value() ShipmentOrder
	// 获取发货商品
	Items() []*ShipmentItem
	// 发货
	Ship(spId int32, spOrderNo string) error
	// 发货完成
	Completed() error
	// 更新快递记录
	UpdateLog() error
	// 智能选择门店
	SmartChoiceShop(address string) (shop.IShop, error)
}

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 ShipFlow

type ShipFlow struct {
	// 记录标题
	Subject string
	// 记录时间
	CreateTime string
	// 备注
	Remark string
}

发货流

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:"-"`
}

发货单

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL