取消后更新订单状态
This commit is contained in:
@@ -670,7 +670,7 @@ func GetUnionOrdersPage(db *DaoDB, vendorIDs, statuss []int, beginTime, endTime
|
|||||||
}
|
}
|
||||||
func SetOrderStatus(db *DaoDB, orderID string, status int) (msg string, err error) {
|
func SetOrderStatus(db *DaoDB, orderID string, status int) (msg string, err error) {
|
||||||
sqlParams := []interface{}{}
|
sqlParams := []interface{}{}
|
||||||
sql := `UPDATE ` + "`order`" + `SET status = ? WHERE 1 = 1`
|
sql := `UPDATE order SET status = ? WHERE 1 = 1`
|
||||||
if status > 0 {
|
if status > 0 {
|
||||||
sqlParams = append(sqlParams, status)
|
sqlParams = append(sqlParams, status)
|
||||||
}
|
}
|
||||||
@@ -686,7 +686,7 @@ func SetOrderStatus(db *DaoDB, orderID string, status int) (msg string, err erro
|
|||||||
}
|
}
|
||||||
func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg string, err error) {
|
func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg string, err error) {
|
||||||
sqlParams := []interface{}{}
|
sqlParams := []interface{}{}
|
||||||
sql := `UPDATE ` + "`user_vendor_order`" + `SET status = ? WHERE 1 = 1`
|
sql := `UPDATE user_vendor_order SET status = ? WHERE 1 = 1`
|
||||||
if status > 0 {
|
if status > 0 {
|
||||||
sqlParams = append(sqlParams, status)
|
sqlParams = append(sqlParams, status)
|
||||||
}
|
}
|
||||||
@@ -694,8 +694,8 @@ func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg
|
|||||||
sql += `AND WHERE local_way_bill = ?`
|
sql += `AND WHERE local_way_bill = ?`
|
||||||
sqlParams = append(sqlParams, localWayBillID)
|
sqlParams = append(sqlParams, localWayBillID)
|
||||||
}
|
}
|
||||||
orderInfos := &model.Order{}
|
Infos := &model.UserVendorOrder{}
|
||||||
if err := GetRow(db, orderInfos, sql, sqlParams); err != nil {
|
if err := GetRow(db, Infos, sql, sqlParams); err != nil {
|
||||||
return "更新UserVendorOrder状态失败", err
|
return "更新UserVendorOrder状态失败", err
|
||||||
}
|
}
|
||||||
return "更新UserVendorOrder状态成功", err
|
return "更新UserVendorOrder状态成功", err
|
||||||
|
|||||||
Reference in New Issue
Block a user