- isGlobal is int.

This commit is contained in:
gazebo
2018-09-17 16:38:33 +08:00
parent 531366631f
commit 35da901319

View File

@@ -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 {