From ddc832936a13a1321d043f8c850119fa7d8adb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 3 Nov 2020 13:38:40 +0800 Subject: [PATCH] gzh queryorder --- business/jxcallback/orderman/order.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 4d4a92ec2..5eef3066c 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1173,9 +1173,14 @@ func GetOrderSimpleInfo(ctx *jxcontext.Context, vendorOrderID string) (getOrderS FROM goods_order a JOIN store b ON IF(a.store_id <> '', a.store_id, a.jx_store_id) = b.id LEFT JOIN waybill c ON c.vendor_order_id = a.vendor_order_id - WHERE a.vendor_order_id = ? + WHERE (a.vendor_order_id LIKE ? OR a.consignee_mobile LIKE ?) + ORDER BY a.order_created_at DESC + LIMIT 1 ` - sqlParams := []interface{}{vendorOrderID} + sqlParams := []interface{}{ + "%" + vendorOrderID + "%", + "%" + vendorOrderID + "%", + } err = dao.GetRow(db, &getOrderSimpleInfoResult, sql, sqlParams) if getOrderSimpleInfoResult == nil { return getOrderSimpleInfoResult, fmt.Errorf("未查询到该订单的信息!")