This commit is contained in:
richboo111
2022-08-03 17:59:44 +08:00
parent f102b2753c
commit 5eff50358a
2 changed files with 6 additions and 26 deletions

View File

@@ -669,19 +669,9 @@ func GetUnionOrdersPage(db *DaoDB, vendorIDs, statuss []int, beginTime, endTime
return page, 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 = ?`
if status > 0 {
sqlParams = append(sqlParams, status)
}
if localWayBillID != "" {
sql += `WHERE a.local_way_bill = ?`
sqlParams = append(sqlParams, localWayBillID)
}
Infos := &model.UserVendorOrder{}
if err := GetRow(db, Infos, sql, sqlParams); err != nil {
return "更新UserVendorOrder状态失败", err
func SetUserVendorOrderStatus(localWayBillID string, status int) (msg string, err error) {
if _, err := ExecuteSQL(GetDB(), "UPDATE `user_vendor_order` SET order_status = ? WHERE local_way_bill = ? ", []interface{}{status, localWayBillID}...); err != nil {
return "", err
}
return "更新UserVendorOrder状态成功", err
}
@@ -695,4 +685,4 @@ func SetOrderStatus(payPrice, payMethod, status int, orderID string) (string, er
return "更新Order状态成功", nil
}
//更新order 支付状态
//更新user_vendor_order 支付状态