pay
This commit is contained in:
@@ -668,22 +668,7 @@ func GetUnionOrdersPage(db *DaoDB, vendorIDs, statuss []int, beginTime, endTime
|
||||
}
|
||||
return page, err
|
||||
}
|
||||
func SetOrderStatus(db *DaoDB, orderID string, status int) (msg string, err error) {
|
||||
sqlParams := []interface{}{}
|
||||
sql := `UPDATE order o SET o.status = ? `
|
||||
if status > 0 {
|
||||
sqlParams = append(sqlParams, status)
|
||||
}
|
||||
if orderID != "" {
|
||||
sql += `WHERE o.order_id = ?`
|
||||
sqlParams = append(sqlParams, orderID)
|
||||
}
|
||||
orderInfos := &model.Order{}
|
||||
if err := GetRow(db, orderInfos, sql, sqlParams); err != nil {
|
||||
return "更新order状态失败", err
|
||||
}
|
||||
return "更新order状态成功", err
|
||||
}
|
||||
|
||||
func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg string, err error) {
|
||||
sqlParams := []interface{}{}
|
||||
sql := `UPDATE user_vendor_order a SET a.order_status = ?`
|
||||
@@ -700,3 +685,11 @@ func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg
|
||||
}
|
||||
return "更新UserVendorOrder状态成功", err
|
||||
}
|
||||
|
||||
//更新order 价格和状态
|
||||
func SetOrderStatus(db *DaoDB, payPrice, payMethod int, orderID string) (string, error) {
|
||||
if _, err := ExecuteSQL(GetDB(), `UPDATE order SET pay_price = ?,pay_method=? WHERE order_id = ? `, []interface{}{payPrice, payMethod, orderID}...); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return "更新Order状态成功", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user