This commit is contained in:
苏尹岚
2021-02-24 17:08:01 +08:00
parent 6b77f9f7c9
commit 1ab1992917
3 changed files with 28 additions and 7 deletions

View File

@@ -483,11 +483,30 @@ func (v *StoreCoupons) TableIndex() [][]string {
}
type AcctOrder 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"`
StoreID int `orm:"column(store_id)" json:"storeID"`
UserID string `orm:"column(user_id);size(48);index" json:"userID"`
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"},
}
}
// 判断是否是购买平台自有物流

View File

@@ -2431,6 +2431,7 @@ func RefreshCouponsStatus(ctx *jxcontext.Context) (err error) {
return err
}
func CreateStoreAcctOrder(ctx *jxcontext.Context, orderType, storeID, price int) (err error) {
return err
func CreateStoreAcctOrder(ctx *jxcontext.Context, orderType, storeID, price int) (acctOrder *model.AcctOrder, err error) {
return acctOrder, err
}

View File

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