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("未查询到该订单的信息!")