From 49403d559d2ed23508898a11e78b358c0ce0746c 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, 19 May 2020 11:11:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 16eadfffb..d34c153fe 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -976,7 +976,7 @@ type GetOrderSimpleInfoResult struct { func GetOrderSimpleInfo(ctx *jxcontext.Context, vendorOrderID string) (getOrderSimpleInfoResult *GetOrderSimpleInfoResult, err error) { db := dao.GetDB() sql := ` - SELECT a.vendor_order_id, a.status, b.waybill_vendor_id, b.courier_name, b.courier_mobile, b.tel1, b.market_man_phone + SELECT a.vendor_order_id, a.status, c.waybill_vendor_id, c.courier_name, c.courier_mobile, b.tel1, b.market_man_phone 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 @@ -984,6 +984,8 @@ func GetOrderSimpleInfo(ctx *jxcontext.Context, vendorOrderID string) (getOrderS ` sqlParams := []interface{}{vendorOrderID} err = dao.GetRow(db, &getOrderSimpleInfoResult, sql, sqlParams) - + if getOrderSimpleInfoResult == nil { + return getOrderSimpleInfoResult, fmt.Errorf("未查询到该订单的信息!订单号:[%v]", vendorOrderID) + } return getOrderSimpleInfoResult, err }