From 2c88914b9672f73615aa5290e42114bcf8138fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 10 Jul 2020 17:21:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 4 ++-- controllers/cms_store_sku.go | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 53b9bae06..99f1b3f47 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -4669,7 +4669,7 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto return true, err } -func StoreSkuPriceAudit(ctx *jxcontext.Context, storeSkuAudits []*model.StoreSkuAudit, status int, isAsync, isContinueWhenError bool) (hint string, err error) { +func StoreSkuPriceAudit(ctx *jxcontext.Context, storeSkuAudits []*model.StoreSkuAudit, status int, isAsync, isContinueWhenError bool) (storeSkuAudits2 []*model.StoreSkuAudit, hint string, err error) { db := dao.GetDB() if status == model.StoreAuditStatusOnline { return nil, "", fmt.Errorf("审核标志不正确!") @@ -4763,5 +4763,5 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeSkuAudits []*model.StoreSku _, err = task.GetResult(0) hint = "1" } - return hint, err + return nil, hint, err } diff --git a/controllers/cms_store_sku.go b/controllers/cms_store_sku.go index ef2a787bd..51f102cad 100644 --- a/controllers/cms_store_sku.go +++ b/controllers/cms_store_sku.go @@ -888,7 +888,11 @@ func (c *StoreSkuController) StoreSkuPriceAudit() { if err = jxutils.Strings2Objs(params.Payload, &storeSkuAudits); err != nil { return retVal, "", err } - retVal, err = cms.StoreSkuPriceAudit(params.Ctx, storeSkuAudits, params.Status, params.IsAsync, params.IsContinueWhenError) - return retVal, "", err + retVal, hint, err := cms.StoreSkuPriceAudit(params.Ctx, storeSkuAudits, params.Status, params.IsAsync, params.IsContinueWhenError) + if hint != "" { + return hint, "", err + } else { + return retVal, "", err + } }) }