- isGlobal is int.
This commit is contained in:
@@ -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 {
|
if num, err = dao.UpdateEntityByKV(db, skuName, valid, nil); err == nil && num == 1 {
|
||||||
isGlobal, _ := payload["isGlobal"].(bool)
|
if utils.Interface2Int64WithDefault(payload["isGlobal"], 0) == 0 && payload["places"] != nil {
|
||||||
if !isGlobal && payload["places"] != nil {
|
|
||||||
if places, ok := payload["places"].([]interface{}); ok {
|
if places, ok := payload["places"].([]interface{}); ok {
|
||||||
if _, err = dao.ExecuteSQL(db, "DELETE FROM sku_name_place_bind WHERE name_id = ?", nameID); err == nil {
|
if _, err = dao.ExecuteSQL(db, "DELETE FROM sku_name_place_bind WHERE name_id = ?", nameID); err == nil {
|
||||||
for _, placeCode := range places {
|
for _, placeCode := range places {
|
||||||
|
|||||||
Reference in New Issue
Block a user