From 5fdc6f5c6cb0b0285af556c0282e75a014b97c8e 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, 30 Jun 2020 15:26:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E4=BA=AC=E4=B8=9C=E5=95=86?= =?UTF-8?q?=E5=9F=8E=E5=B7=B2=E5=88=A0=E9=99=A4=E7=9A=84=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=86=8D=E5=88=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jdshop/store_sku.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index fac104bf7..cd0295bdc 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -24,7 +24,8 @@ import ( const ( deleteErr1 = "已经删除的不能直接下架" - deleteErr2 = "SKU不存在" + deleteErr2 = "SKU" + deleteErr3 = "已删除" ) var ( @@ -385,7 +386,7 @@ func (p *PurchaseHandler) GetSensitiveWordRegexp() *regexp.Regexp { } func (p *PurchaseHandler) IsErrSkuNotExist(err error) (isNotExist bool) { - if strings.Contains(err.Error(), deleteErr1) { + if strings.Contains(err.Error(), deleteErr1) || (strings.Contains(err.Error(), deleteErr2) && strings.Contains(err.Error(), deleteErr3)) { return true } return false