This commit is contained in:
苏尹岚
2021-02-24 18:10:11 +08:00
parent 1ab1992917
commit 5ae8814ef4
4 changed files with 42 additions and 38 deletions

View File

@@ -35,6 +35,7 @@ const (
OrderTypeMatter = 1 //物料订单
OrderTypeSupplyGoods = 2 //进货订单
OrderTypeDefendPrice = 3 //守价订单
OrderTypeStoreAcct = 4 //门店账户订单
)
const (
@@ -482,33 +483,6 @@ func (v *StoreCoupons) TableIndex() [][]string {
}
}
type AcctOrder struct {
ModelIDCUL
VendorOrderID string `orm:"column(vendor_order_id)" json:"vendorOrderID"` //订单号
UserID string `orm:"column(user_id);size(48)" json:"userID"` //用户ID
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
OrderType int `json:"orderType"` //订单类型
Status int `json:"status"` //订单状态,待支付2已支付5支付成功110支付失败115
PayPrice int `json:"payPrice"` //支付金额
OriginalData string `orm:"type(text)" json:"-"`
Comment string `orm:"size(255)" json:"comment"` //备注
}
func (v *AcctOrder) TableUnique() [][]string {
return [][]string{
[]string{"VendorOrderID"},
}
}
func (v *AcctOrder) TableIndex() [][]string {
return [][]string{
[]string{"CreatedAt"},
[]string{"StoreID"},
[]string{"UserID"},
}
}
// 判断是否是购买平台自有物流
// 对于京东,饿百来说,就是其自有的物流,对于微商城来说,是达达
func IsWaybillPlatformOwn(bill *Waybill) bool {