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 {