This commit is contained in:
苏尹岚
2021-03-01 15:55:53 +08:00
parent b9c6eced38
commit c6ad936d08
2 changed files with 20 additions and 1 deletions

View File

@@ -485,6 +485,25 @@ func (v *StoreCoupons) TableIndex() [][]string {
}
}
type StoreAcctOrder struct {
ModelIDCUL
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
ActualPayPrice int `json:"actualPayPrice"` // 单位为分 顾客实际支付
UserID string `orm:"column(user_id);size(48);index" json:"userID"`
OrderType int `json:"orderType"`
Status int `json:"status"` // 参见OrderStatus*相关的常量定义 // 重复新订单消息数这个一般不是由于消息重发造成的消息重发由OrderStatus过滤一般是业务逻辑造成的
OrderFinishedAt time.Time `orm:"type(datetime)" json:"orderFinishedAt"`
}
func (v *StoreAcctOrder) TableUnique() [][]string {
return [][]string{
[]string{"VendorOrderID", "VendorID"},
}
}
// 判断是否是购买平台自有物流
// 对于京东,饿百来说,就是其自有的物流,对于微商城来说,是达达
func IsWaybillPlatformOwn(bill *Waybill) bool {

View File

@@ -104,7 +104,7 @@ func Init() {
orm.RegisterModel(&model.StoreAcct{})
orm.RegisterModel(&model.StoreAcctExpend{})
orm.RegisterModel(&model.StoreAcctIncome{})
orm.RegisterModel(&model.StoreAcctOrder{})
// create table
orm.RunSyncdb("default", false, true)
}