From 65f41defef0378df05cbfb98f64e1d66cd840813 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, 11 Mar 2020 10:40:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=95=86=E5=93=81updateskuna?= =?UTF-8?q?me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 6aca48058..8e1c8bc6a 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -849,7 +849,10 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf } } } - + var eclpID string + if payload["eclpID"] != nil { + eclpID = payload["eclpID"].(string) + } dao.Begin(db) defer func() { if r := recover(); r != nil { @@ -862,7 +865,7 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf dao.Rollback(db) return 0, err } - if !isExd && payload["eclpID"].(string) == "" { + if !isExd && eclpID == "" { if err = OnUpdateThing(ctx, db, nil, int64(nameID), model.ThingTypeSkuName); err != nil { dao.Rollback(db) return 0, err