From e7d6da9e1d6356d5554107151e545caca99df43f Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 27 Jul 2022 18:05:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=90=8E=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/dao_order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index c4831d5e0..44561c8df 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -691,7 +691,7 @@ func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg sqlParams = append(sqlParams, status) } if localWayBillID != "" { - sql += `AND WHERE local_way_bill = ?` + sql += `WHERE local_way_bill = ?` sqlParams = append(sqlParams, localWayBillID) } Infos := &model.UserVendorOrder{} From 7036c87d09cb863548f749d976f0089b39ed3e41 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 27 Jul 2022 18:09:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=90=8E=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/dao_order.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index 44561c8df..e57fa28ec 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -670,12 +670,12 @@ func GetUnionOrdersPage(db *DaoDB, vendorIDs, statuss []int, beginTime, endTime } func SetOrderStatus(db *DaoDB, orderID string, status int) (msg string, err error) { sqlParams := []interface{}{} - sql := `UPDATE order SET status = ? ` + sql := `UPDATE order o SET o.status = ? ` if status > 0 { sqlParams = append(sqlParams, status) } if orderID != "" { - sql += `WHERE order_id = ?` + sql += `WHERE o.order_id = ?` sqlParams = append(sqlParams, orderID) } orderInfos := &model.Order{} @@ -686,12 +686,12 @@ func SetOrderStatus(db *DaoDB, orderID string, status int) (msg string, err erro } func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg string, err error) { sqlParams := []interface{}{} - sql := `UPDATE user_vendor_order SET order_status = ?` + sql := `UPDATE user_vendor_order a SET a.order_status = ?` if status > 0 { sqlParams = append(sqlParams, status) } if localWayBillID != "" { - sql += `WHERE local_way_bill = ?` + sql += `WHERE a.local_way_bill = ?` sqlParams = append(sqlParams, localWayBillID) } Infos := &model.UserVendorOrder{}