添加GoodsOrder.DeliveryFeeFrom表示三方运单计算参考起始时间
重构平台添加小费及三方配送召唤逻辑
This commit is contained in:
@@ -14,55 +14,56 @@ type ModelTimeInfo struct {
|
||||
}
|
||||
|
||||
type GoodsOrder struct {
|
||||
ID int64 `orm:"column(id)" json:"id"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||
VendorOrderID2 string `orm:"column(vendor_order_id2);size(48);index" json:"vendorOrderID2"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"`
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
|
||||
JxStoreID int `orm:"column(jx_store_id)" json:"jxStoreID"` // 根据VendorStoreID在本地系统里查询出来的 jxstoreid
|
||||
StoreName string `orm:"size(64)" json:"storeName"`
|
||||
ShopPrice int64 `json:"shopPrice"` // 京西价
|
||||
VendorPrice int64 `json:"vendorPrice"` // 平台价
|
||||
SalePrice int64 `json:"salePrice"` // 售卖价
|
||||
ActualPayPrice int64 `json:"actualPayPrice"` // 单位为分 顾客实际支付
|
||||
TotalShopMoney int64 `json:"totalShopMoney"` // 应结金额-第三方平台结算给京西的金额(包括了所有的补贴,扣除)
|
||||
DiscountMoney int64 `json:"discountMoney"` // 订单总优惠金额
|
||||
PmSubsidyMoney int64 `json:"pmSubsidyMoney"` // 平台活动补贴(订单主体活动补贴+订单单条sku补贴)1+
|
||||
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
|
||||
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
|
||||
EarningPrice int64 `json:"earningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)
|
||||
Weight int `json:"weight"` // 单位为克
|
||||
VendorUserID string `orm:"column(vendor_user_id);size(48)" json:"vendorUserID"`
|
||||
UserID string `orm:"column(user_id);size(48)" json:"userID"`
|
||||
ConsigneeName string `orm:"size(32)" json:"consigneeName"`
|
||||
ConsigneeMobile string `orm:"size(32)" json:"consigneeMobile"`
|
||||
ConsigneeMobile2 string `orm:"size(32)" json:"consigneeMobile2"`
|
||||
ConsigneeAddress string `orm:"size(255)" json:"consigneeAddress"`
|
||||
CoordinateType int `json:"coordinateType"`
|
||||
ConsigneeLng int `json:"consigneeLng"` // 坐标 * (10的六次方)
|
||||
ConsigneeLat int `json:"consigneeLat"` // 坐标 * (10的六次方)
|
||||
SkuCount int `json:"skuCount"` // 商品类别数量,即有多少种商品(注意在某些情况下,相同SKU的商品由于售价不同,也会当成不同商品在这个值里)
|
||||
GoodsCount int `json:"goodsCount"` // 商品个数
|
||||
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
||||
VendorStatus string `orm:"size(255)" json:"vendorStatus"`
|
||||
LockStatus int `json:"lockStatus"`
|
||||
LockStatusTime time.Time `orm:"type(datetime);null" json:"lockStatusTime"` // last lock status time
|
||||
OrderSeq int `json:"orderSeq"` // 门店订单序号
|
||||
BuyerComment string `orm:"size(255)" json:"buyerComment"`
|
||||
BusinessType int `json:"businessType"`
|
||||
ExpectedDeliveredTime time.Time `orm:"type(datetime)" json:"expectedDeliveredTime"` // 预期送达时间
|
||||
CancelApplyReason string `orm:"size(255)" json:"-"` // ""表示没有申请,不为null表示用户正在取消申请
|
||||
DeliveryType string `orm:"size(32)" json:"deliveryType"` // 订单配送方式,缺省是平台配送
|
||||
VendorWaybillID string `orm:"column(vendor_waybill_id);size(48)" json:"vendorWaybillID"`
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id)" json:"waybillVendorID"` // 表示当前承运商,-1表示还没有安排
|
||||
AdjustCount int8 `json:"adjustCount"` // 调整单(次数)
|
||||
DeliveryFlag int8 `json:"deliveryFlag"` // 第1位为1表示禁止调度器调度三方配送
|
||||
DuplicatedCount int `json:"-"` // 重复新订单消息数,这个一般不是由于消息重发造成的(消息重发由OrderStatus过滤),一般是业务逻辑造成的
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"orderCreatedAt"` // 这里记录的是订单生效时间,即用户支付完成(货到付款即为下单时间)
|
||||
OrderFinishedAt time.Time `orm:"type(datetime)" json:"orderFinishedAt"`
|
||||
StatusTime time.Time `orm:"type(datetime)" json:"statusTime"` // last status time
|
||||
PickDeadline time.Time `orm:"type(datetime);null" json:"pickDeadline"`
|
||||
ID int64 `orm:"column(id)" json:"id"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||
VendorOrderID2 string `orm:"column(vendor_order_id2);size(48);index" json:"vendorOrderID2"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"`
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
|
||||
JxStoreID int `orm:"column(jx_store_id)" json:"jxStoreID"` // 根据VendorStoreID在本地系统里查询出来的 jxstoreid
|
||||
StoreName string `orm:"size(64)" json:"storeName"`
|
||||
ShopPrice int64 `json:"shopPrice"` // 京西价
|
||||
VendorPrice int64 `json:"vendorPrice"` // 平台价
|
||||
SalePrice int64 `json:"salePrice"` // 售卖价
|
||||
ActualPayPrice int64 `json:"actualPayPrice"` // 单位为分 顾客实际支付
|
||||
TotalShopMoney int64 `json:"totalShopMoney"` // 应结金额-第三方平台结算给京西的金额(包括了所有的补贴,扣除)
|
||||
DiscountMoney int64 `json:"discountMoney"` // 订单总优惠金额
|
||||
PmSubsidyMoney int64 `json:"pmSubsidyMoney"` // 平台活动补贴(订单主体活动补贴+订单单条sku补贴)1+
|
||||
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
|
||||
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
|
||||
EarningPrice int64 `json:"earningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)
|
||||
Weight int `json:"weight"` // 单位为克
|
||||
VendorUserID string `orm:"column(vendor_user_id);size(48)" json:"vendorUserID"`
|
||||
UserID string `orm:"column(user_id);size(48)" json:"userID"`
|
||||
ConsigneeName string `orm:"size(32)" json:"consigneeName"`
|
||||
ConsigneeMobile string `orm:"size(32)" json:"consigneeMobile"`
|
||||
ConsigneeMobile2 string `orm:"size(32)" json:"consigneeMobile2"`
|
||||
ConsigneeAddress string `orm:"size(255)" json:"consigneeAddress"`
|
||||
CoordinateType int `json:"coordinateType"`
|
||||
ConsigneeLng int `json:"consigneeLng"` // 坐标 * (10的六次方)
|
||||
ConsigneeLat int `json:"consigneeLat"` // 坐标 * (10的六次方)
|
||||
SkuCount int `json:"skuCount"` // 商品类别数量,即有多少种商品(注意在某些情况下,相同SKU的商品由于售价不同,也会当成不同商品在这个值里)
|
||||
GoodsCount int `json:"goodsCount"` // 商品个数
|
||||
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
||||
VendorStatus string `orm:"size(255)" json:"vendorStatus"`
|
||||
LockStatus int `json:"lockStatus"`
|
||||
LockStatusTime time.Time `orm:"type(datetime);null" json:"lockStatusTime"` // last lock status time
|
||||
OrderSeq int `json:"orderSeq"` // 门店订单序号
|
||||
BuyerComment string `orm:"size(255)" json:"buyerComment"`
|
||||
BusinessType int `json:"businessType"`
|
||||
ExpectedDeliveredTime time.Time `orm:"type(datetime)" json:"expectedDeliveredTime"` // 预期送达时间
|
||||
CancelApplyReason string `orm:"size(255)" json:"-"` // ""表示没有申请,不为null表示用户正在取消申请
|
||||
DeliveryType string `orm:"size(32)" json:"deliveryType"` // 订单配送方式,缺省是平台配送
|
||||
VendorWaybillID string `orm:"column(vendor_waybill_id);size(48)" json:"vendorWaybillID"`
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id)" json:"waybillVendorID"` // 表示当前承运商,-1表示还没有安排
|
||||
AdjustCount int8 `json:"adjustCount"` // 调整单(次数)
|
||||
DeliveryFlag int8 `json:"deliveryFlag"` // 第1位为1表示禁止调度器调度三方配送
|
||||
DuplicatedCount int `json:"-"` // 重复新订单消息数,这个一般不是由于消息重发造成的(消息重发由OrderStatus过滤),一般是业务逻辑造成的
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"orderCreatedAt"` // 这里记录的是订单生效时间,即用户支付完成(货到付款即为下单时间)
|
||||
OrderFinishedAt time.Time `orm:"type(datetime)" json:"orderFinishedAt"`
|
||||
StatusTime time.Time `orm:"type(datetime)" json:"statusTime"` // last status time
|
||||
PickDeadline time.Time `orm:"type(datetime);null" json:"pickDeadline"`
|
||||
DeliveryFeeFrom *time.Time `orm:"type(datetime);null" json:"deliveryFeeFrom,omitempty"` // 三方配置费计算的开始基准时间
|
||||
ModelTimeInfo `json:"-"`
|
||||
Flag int `json:"flag"` //非运单调整相关的其它状态
|
||||
|
||||
|
||||
Reference in New Issue
Block a user