Files
jx-callback/business/model/order.go
苏尹岚 bb2fab1ef3 aa
2021-01-19 09:12:38 +08:00

519 lines
25 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
import (
"time"
)
const (
OrderDeliveryTypePlatform = "platform" // 平台负责配送
OrderDeliveryTypeStoreSelf = "store" // 门店自送
OrderDeliveryTypeSelfTake = "self" // 用户自提
)
const (
PayTypeWX = 1 // 微信支付
PayTypeTL = 2 // 通联宝支付
PayTypeTL_DiscountCard = 3 // 通联宝支付(会员折扣卡)
PayStatusNo = 0
PayStatusYes = 1
PayStatusFailed = 2
PayStatusCanceled = 3
PayStatusRefund = 4
RefundStatusNo = 0
RefundStatusYes = 1
RefundStatusFailed = 2
EarningTypeQuote = 1 //报价模式
EarningTypePoints = 2 //扣点模式
)
const (
OrderTypeAddressErr = -1 //地址异常订单
OrderTypeNormal = 0 //普通订单
OrderTypeMatter = 1 //物料订单
OrderTypeSupplyGoods = 2 //进货订单
OrderTypeDefendPrice = 3 //守价订单
)
const (
CouponStatusRe = -2 //优惠券状态还没生效
CouponStatusOverdue = -1 //已过期
CouponStatusNormal = 0 //正常
CouponStatusDeleted = -4 //被删了
)
const (
UserCouponStatusUsed = 1 // 已被使用
)
var (
PayStatusName = map[int]string{
PayStatusNo: "待支付",
PayStatusYes: "已支付",
PayStatusFailed: "支付失败",
PayStatusCanceled: "支付取消",
PayStatusRefund: "已退款",
}
RefundStatusName = map[int]string{
RefundStatusNo: "待退款",
RefundStatusYes: "已退款",
RefundStatusFailed: "退款失败",
}
CouponStatusName = map[int]string{
CouponStatusRe: "还没生效",
CouponStatusOverdue: "已过期",
CouponStatusNormal: "正常",
UserCouponStatusUsed: "已被使用",
CouponStatusDeleted: "已删除",
}
)
type ModelTimeInfo struct {
CreatedAt time.Time `orm:"auto_now_add;type(datetime)"`
UpdatedAt time.Time `orm:"auto_now;type(datetime)"`
}
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(200);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+
BaseFreightMoney int64 `json:"baseFreightMoney"` // 商户承担的配送费不包括DistanceFreightMoney
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
EarningPrice int64 `json:"earningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)
NewEarningPrice int64 `json:"newEarningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)(新规则)
Weight int `json:"weight"` // 单位为克
VendorUserID string `orm:"column(vendor_user_id);size(48)" json:"vendorUserID"`
UserID string `orm:"column(user_id);size(48);index" 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"` //非运单调整相关的其它状态
InvoiceTitle string `orm:"size(64)" json:"invoiceTitle"` // 发票抬头
InvoiceTaxerID string `orm:"size(32);column(invoice_taxer_id)" json:"invoiceTaxerID"` // 发票纳税人识别码
InvoiceEmail string `orm:"size(64)" json:"invoiceEmail"` // 发票邮箱
VendorOrgCode string `orm:"size(64)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
FromStoreID int `orm:"column(from_store_id)" json:"fromStoreID"` //物料配送门店
EclpOutID string `orm:"column(eclp_out_id)" json:"eclpOutID"` //物料配送的出库单号
AddressID int64 `orm:"column(address_id)" json:"addressID"` //配送地址ID
EarningType int `json:"earningType"` //订单结算方式2为扣点1为报价
OrderType int `json:"orderType"` //订单类型0为普通订单1为物料订单2为进货订单
OrderPayPercentage int `json:"orderPayPercentage"`
// 以下只是用于传递数据
OriginalData string `orm:"-" json:"-"`
Skus []*OrderSku `orm:"-" json:"-"`
}
func (o *GoodsOrder) TableUnique() [][]string {
return [][]string{
[]string{"VendorOrderID", "VendorID"},
}
}
type GoodsOrderOriginal struct {
ID int64 `orm:"column(id)" json:"-"`
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
AccountNo string `orm:"size(32)" json:"accountNo"`
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"orderCreatedAt"` // 这里记录的是订单生效时间,即用户支付完成(货到付款即为下单时间)
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
OriginalData string `orm:"type(text)" json:"-"`
}
func (o *GoodsOrderOriginal) TableUnique() [][]string {
return [][]string{
[]string{"VendorOrderID", "VendorID"},
}
}
type OrderSku struct {
ID int64 `orm:"column(id)" json:"-"`
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
StoreSubID int `orm:"column(store_sub_id)" json:"storeSubID"` // EarningActID当前这个字段被当成结算活动ID用
StoreSubName string `orm:"size(64)" json:"storeSubName"` // 当前这个字段被用作vendorActType
Count int `json:"count"`
VendorSkuID string `orm:"column(vendor_sku_id);size(48)" json:"vendorSkuID"`
SkuID int `orm:"column(sku_id)" json:"skuID"` // 外部系统里记录的 jxskuid
JxSkuID int `orm:"column(jx_sku_id)" json:"jxSkuID"` // 根据VendorSkuID在本地系统里查询出来的 jxskuid
SkuName string `orm:"size(255)" json:"skuName"`
ShopPrice int64 `json:"shopPrice"` // 京西价
VendorPrice int64 `json:"vendorPrice"` // 平台价
SalePrice int64 `json:"salePrice"` // 售卖价
EarningPrice int64 `json:"earningPrice"` // 活动商品设置结算给门店老板的钱如果结算活动ID为0是按结算比例算的否则就是结算表中的值
Weight int `json:"weight"` // 单位为克
SkuType int `json:"skuType"` // 当前如果为gift就为1否则缺省为0
PromotionType int `json:"promotionType"` // todo 当前是用于记录京东的PromotionType(生成jxorder用),没有做转换
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"-"` // 分区考虑
IsVendorAct int `json:"isVendorAct"`
}
// 同样商品在一个订单中可能重复出现(比如搞活动时,相同商品价格不一样,第一个有优惠)
// 所以这里不能用唯一索引
func (o *OrderSku) TableIndex() [][]string {
return [][]string{
[]string{"VendorOrderID", "SkuID"},
[]string{"JxSkuID", "VendorOrderID"},
}
}
type Waybill struct {
ID int64 `orm:"column(id)" json:"-"`
VendorWaybillID string `orm:"column(vendor_waybill_id);size(48)" json:"vendorWaybillID"`
VendorWaybillID2 string `orm:"column(vendor_waybill_id2);size(48)" json:"vendorWaybillID2"` // 某些平台有多个ID比如美团配送当前美团配送的 delivery_id存这里
WaybillVendorID int `orm:"column(waybill_vendor_id)" json:"waybillVendorID"`
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
OrderVendorID int `orm:"column(order_vendor_id)" json:"orderVendorID"`
CourierName string `orm:"size(32)" json:"courierName"`
CourierMobile string `orm:"size(32)" json:"courierMobile"`
Status int `json:"status"` // 参见WaybillStatus*相关的常量定义
VendorStatus string `orm:"size(255)" json:"-"`
ActualFee int64 `json:"actualFee"` // 实际要支付给快递公司的费用
DesiredFee int64 `json:"desiredFee"` // 运单总费用
TipFee int64 `json:"tipFee"` // 运单小费,不含在上两项中
DuplicatedCount int `json:"-"` // 重复新订单消息数这个一般不是由于消息重发造成的消息重发由OrderStatus过滤一般是业务逻辑造成的
DeliveryFlag int8 `json:"deliveryFlag"`
WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"`
WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"`
StatusTime time.Time `orm:"type(datetime)" json:"-"` // last status time
ModelTimeInfo `json:"-"`
OriginalData string `orm:"type(text)" json:"-"`
Remark string `orm:"-" json:"-"` // 用于传递remark
VendorOrgCode string `orm:"size(64)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
}
func (w *Waybill) TableUnique() [][]string {
return [][]string{
[]string{"VendorWaybillID", "WaybillVendorID"},
}
}
func (w *Waybill) TableIndex() [][]string {
return [][]string{
[]string{"VendorOrderID"},
}
}
type WaybillExt struct {
Waybill
Lng float64 `json:"lng"`
Lat float64 `json:"lat"`
}
// 包含订单与运单的状态及事件vendor status
type OrderStatus struct {
ID int64 `orm:"column(id)" json:"id"`
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
OrderType int `json:"orderType"` // 0:订单1运单
RefVendorOrderID string `orm:"column(ref_vendor_order_id);size(48)" json:"refVendorOrderID"`
RefVendorID int `orm:"column(ref_vendor_id)" json:"refVendorID"`
Status int `json:"status"` // 如果Status为OrderStatusEvent表示VendorStatus只是一个通知事件不是状态变化
VendorStatus string `orm:"size(255)" json:"vendorStatus"`
StatusTime time.Time `orm:"type(datetime);index" json:"statusTime"`
DuplicatedCount int `json:"-"` // 收到的重复状态转换(或消息)数,一般是由于重发造成的
Remark string `orm:"size(255)" json:"remark"`
ModelTimeInfo `json:"-"`
// LockStatus int `orm:"-" json:"-"` // todo 只是用于传递状态,应该可以优化掉
}
func (v *OrderStatus) TableIndex() [][]string {
return [][]string{
[]string{"VendorOrderID", "Status", "VendorStatus"},
[]string{"RefVendorOrderID", "Status", "VendorStatus"},
}
}
func Order2Status(order *GoodsOrder) (retVal *OrderStatus) {
retVal = &OrderStatus{
VendorOrderID: order.VendorOrderID,
VendorID: order.VendorID,
OrderType: OrderTypeOrder,
RefVendorOrderID: order.VendorOrderID,
RefVendorID: order.VendorID,
Status: order.Status,
VendorStatus: order.VendorStatus,
StatusTime: order.StatusTime,
// LockStatus: order.LockStatus,
}
return retVal
}
func Waybill2Status(bill *Waybill) (retVal *OrderStatus) {
retVal = &OrderStatus{
VendorOrderID: bill.VendorWaybillID,
VendorID: bill.WaybillVendorID,
OrderType: OrderTypeWaybill,
RefVendorOrderID: bill.VendorOrderID,
RefVendorID: bill.OrderVendorID,
Status: bill.Status,
VendorStatus: bill.VendorStatus,
StatusTime: bill.StatusTime,
Remark: bill.Remark,
}
return retVal
}
// 判断订单是否是临时的不是真实收到了new order消息后的订单
func IsOrderSolid(order *GoodsOrder) bool {
return order != nil && !(order.ConsigneeName == "" && order.ID == 0)
}
func (o *GoodsOrder) GetStatusTime() time.Time {
return o.StatusTime
}
func (o *Waybill) GetStatusTime() time.Time {
return o.StatusTime
}
func (o *OrderStatus) GetStatusTime() time.Time {
return o.StatusTime
}
type OrderComment struct {
ModelIDCUL
VendorOrderID string `orm:"column(vendor_order_id);size(48);unique" json:"vendorOrderID"`
VendorOrderID2 string `orm:"column(vendor_order_id2);size(48);unique" 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
ConsigneeMobile string `orm:"size(32)" json:"consigneeMobile"`
UserCommentID string `orm:"column(user_comment_id);size(48)" json:"userCommentID"`
IsReplied int8
Status int8
ModifyDuration int16 // 改评价的小时数
TagList string
Score int8
Content string
CommentCreatedAt time.Time
OriginalMsg string `orm:"type(text)" json:"-"`
UpdatedTagList string
UpdatedScore int8
UpdatedContent string
CommentUpdatedAt time.Time
UpdatedOriginalMsg string `orm:"type(text)" json:"-"`
}
type OrderPay struct {
ModelIDCULD
PayOrderID string `orm:"column(pay_order_id);size(48)" json:"payOrderID"` // 京西支付定单号
PayType int `json:"payType"`
VendorPayType string `orm:"size(48)" json:"vendorPayType"`
VendorOrderID string `orm:"column(vendor_order_id);size(48);index" json:"vendorOrderID"` // 支付对应的购物订单号
VendorID int `orm:"column(vendor_id)" json:"vendorID"` // 购物订单所属厂商代码(当前只有京西)
Status int `json:"status"`
PayCreatedAt time.Time `orm:"type(datetime);index" json:"payCreatedAt"`
PayFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
TotalFee int `json:"totalFee"`
PrepayID string `orm:"column(prepay_id);index;size(48)" json:"prepayID"` // 下单后支付前支付方生成的事务ID
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"` // 支付成功后支付方生成的事务ID
CodeURL string `orm:"column(code_url);size(3200)" json:"codeURL"`
OriginalData string `orm:"type(text)" json:"-"`
}
func (v *OrderPay) TableIndex() [][]string {
return [][]string{
[]string{"PayOrderID", "PayType", "DeletedAt"},
}
}
type OrderPayRefund struct {
ModelIDCULD
RefundID string `orm:"column(refund_id);unique;size(48)" json:"refundID"`
VendorRefundID string `orm:"column(vendor_refund_id);unique;size(48)" json:"vendorRefundID"` // 支付方退款成功后生成的退款单号
VendorOrderID string `orm:"column(vendor_order_id);index;size(48)" json:"vendorOrderID"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"` // 支付成功后支付方生成的事务ID
Status int `json:"status"`
RefundCreatedAt time.Time `orm:"type(datetime);index" json:"payCreatedAt"`
RefundFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
RefundFee int `json:"refundFee"`
OriginalData string `orm:"type(text)" json:"-"`
}
type OrderSupplementFee struct {
ModelIDCULD
StoreID int `orm:"column(store_id)" json:"storeID"`
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorID *int `orm:"column(vendor_id);null" json:"vendorID"`
Status int `json:"status"` //账单状态,若已结账则不允许再修改 ,暂时 0为未结账1为已结账,-1为作废
LinkID int `orm:"column(link_id)" json:"linkID"` //作为冲账标志关联某条扣款记录
SupplementTime *time.Time `orm:"type(datetime);null" json:"supplementTime"`
Type int `json:"type"` //扣款类型1为差评订单补贴2为优惠券
SupplementFee int `json:"supplementFee"` //扣款金额
BillID string `orm:"column(bill_id);size(48)" json:"billID"` //账单ID
Comment string `orm:"size(255)" json:"comment"`
}
func (v *OrderSupplementFee) TableIndex() [][]string {
return [][]string{
[]string{"StoreID", "VendorOrderID", "SupplementTime"},
}
}
type PriceDefendOrder struct {
ModelIDCULD
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
StoreID int `orm:"column(store_id)" json:"storeID"`
SkuID int `orm:"column(sku_id)" json:"skuID"`
AddressID int64 `orm:"column(address_id)" json:"addressID"`
Count int `json:"count"`
DefendPrice int64 `json:"defendPrice"` //守的价格
OriginPrice int64 `json:"originPrice"` //商品原价
ActualPayPrice int64 `json:"actualPayPrice"` //单位为分 顾客实际支付
RealPrice int64 `json:"realPrice"` //实际成交价
IsBuyNowPrice int `json:"isBuyNowPrice"` //库存剩x(x=当前客户购买的数量)时以当时价抢购
Issue int `json:"issue"` //期数每晚2200以后的守价单是归在第二天的期数中
IsSuccess int `json:"isSuccess"` //是否抢购成功
IsPay int `json:"isPay"` //是否支付
}
func (v *PriceDefendOrder) TableIndex() [][]string {
return [][]string{
[]string{"StoreID", "VendorOrderID", "SkuID"},
}
}
type Coupons struct {
ModelIDCUL
CouponType int `json:"couponType"` //优惠券类型 1为总额满减 2为运费优惠
Name string `json:"name"` //优惠券名字
Desc string `json:"desc"` //优惠券详情描述
BeginAt time.Time `json:"beginAt"` //开始时间
EndAt time.Time `json:"endAt"` //到期时间
UpperLimit int `json:"upperLimit"` //满多少
Cut int `json:"cut"` //减多少
CouponStatus int `json:"couponStatus"` //优惠券状态0为正常可使用-1为已过期 -2为还没开始
IsAll int `json:"isAll"` //是否全国有效1是
}
func (v *Coupons) TableIndex() [][]string {
return [][]string{
[]string{"BeginAt"},
}
}
type UserCoupons struct {
ModelIDCUL
CouponID int `orm:"column(coupon_id)" json:"couponID"` //优惠券ID
UserID string `orm:"column(user_id)" json:"userID"` //userID
Mobile string `json:"moblie"` //电话,可能他还没注册
UserCouponStatus int `json:"userCouponStatus"` //优惠券状态0为正常可使用-1为已过期 1为已使用
}
func (v *UserCoupons) TableIndex() [][]string {
return [][]string{
[]string{"CouponID", "UserID", "Mobile"},
}
}
type StoreCoupons struct {
ModelIDCULD
CouponID int `orm:"column(coupon_id)" json:"couponID"` //优惠券ID
StoreID int `orm:"column(store_id)" json:"storeID"` //storeID
}
func (v *StoreCoupons) TableIndex() [][]string {
return [][]string{
[]string{"CouponID", "StoreID"},
}
}
// 判断是否是购买平台自有物流
// 对于京东,饿百来说,就是其自有的物流,对于微商城来说,是达达
func IsWaybillPlatformOwn(bill *Waybill) bool {
return bill.OrderVendorID == bill.WaybillVendorID
}
// 订单是否已经有了有效运单
func IsOrderHaveWaybill(order *GoodsOrder) bool {
return order.WaybillVendorID != VendorIDUnknown && order.VendorWaybillID != ""
}
// 订单是否有自己平台的有效运单
func IsOrderHaveOwnWaybill(order *GoodsOrder) bool {
return order.VendorID == order.WaybillVendorID && order.VendorWaybillID != ""
}
// 订单的初始配送方式是否是门店自配送
func IsOrderDeliveryByStore(order *GoodsOrder) bool {
return order.DeliveryType == OrderDeliveryTypeStoreSelf
}
// 订单的初始配送方式是否是平台负责配送
func IsOrderDeliveryByPlatform(order *GoodsOrder) bool {
return order.DeliveryType == OrderDeliveryTypePlatform
}
//订单是否是自提单
func IsOrderDeliveryBySelf(order *GoodsOrder) bool {
return order.DeliveryType == OrderDeliveryTypeStoreSelf
}
func IsOrderJXTemp(order *GoodsOrder) bool {
return order.VendorID == VendorIDJX && order.Flag&OrderFlagMaskTempJX != 0
}
func IsAfsOrderJXTemp(order *AfsOrder) bool {
return order.VendorID == VendorIDJX && order.Flag&OrderFlagMaskTempJX != 0
}