From 89740b5451dc7a45b4f903f29eb99eac4e494699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 6 Nov 2019 10:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=8E=86=E5=8F=B2=E8=AE=A2?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 6552734f2..45ef08056 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -628,6 +628,9 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context, } orderList, _ := dao.QueryOrders(db, []int{vendorOrderId}, 0, fromDateParm, toDateParm) + if len(orderList) == 0 { + return errors.New(fmt.Sprintf("未查询到订单!时间范围:[%v] 至 [%v]", fromDate, toDate)) + } task := tasksch.NewSeqTask("按订单刷新历史订单结算价", ctx, func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) { switch step { @@ -640,7 +643,7 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context, for _, value := range order.Skus { dao.Begin(db) _, err := dao.UpdateOrderSkuEariningPrice(db, value, v.StoreID, fromDateParm, toDateParm) - if err == nil{ + if err == nil { dao.Commit(db) } if err != nil && !isContinueWhenError {