From 35da9013197a4ed940a368d4dbefa8cb6accd24f Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 17 Sep 2018 16:38:33 +0800 Subject: [PATCH] - isGlobal is int. --- business/jxstore/cms/sku.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 07c2331b1..c75624f14 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -361,8 +361,7 @@ func UpdateSkuName(nameID int, payload map[string]interface{}, userName string) } }() if num, err = dao.UpdateEntityByKV(db, skuName, valid, nil); err == nil && num == 1 { - isGlobal, _ := payload["isGlobal"].(bool) - if !isGlobal && payload["places"] != nil { + if utils.Interface2Int64WithDefault(payload["isGlobal"], 0) == 0 && payload["places"] != nil { if places, ok := payload["places"].([]interface{}); ok { if _, err = dao.ExecuteSQL(db, "DELETE FROM sku_name_place_bind WHERE name_id = ?", nameID); err == nil { for _, placeCode := range places {