- fix bug placeBind := &model.SkuNamePlaceBind{}

This commit is contained in:
gazebo
2018-09-20 18:07:00 +08:00
parent d8eb17f6be
commit c0e179a3e0

View File

@@ -373,7 +373,7 @@ func UpdateSkuName(nameID int, payload map[string]interface{}, userName string)
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 {
placeBind := model.SkuNamePlaceBind{}
placeBind := &model.SkuNamePlaceBind{}
placeBind.PlaceCode = int(utils.Interface2Int64WithDefault(placeCode, 0))
if placeBind.PlaceCode > 0 {
dao.WrapAddIDCULEntity(placeBind, userName)