Feat: vas alipay

This commit is contained in:
HFO4
2020-02-17 12:33:54 +08:00
parent 41f9f3497f
commit f8c14b3826
9 changed files with 225 additions and 4 deletions

View File

@@ -45,3 +45,15 @@ func (order *Order) Create() (uint, error) {
}
return order.ID, nil
}
// UpdateStatus 更新订单状态
func (order *Order) UpdateStatus(status int) {
DB.Model(order).Update("status", status)
}
// GetOrderByNo 根据商户订单号查询订单
func GetOrderByNo(id string) (*Order, error) {
var order Order
err := DB.Where("order_no = ?", id).First(&order).Error
return &order, err
}