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