- fix bug placeBind := &model.SkuNamePlaceBind{}
This commit is contained in:
@@ -373,7 +373,7 @@ func UpdateSkuName(nameID int, payload map[string]interface{}, userName string)
|
|||||||
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 {
|
||||||
placeBind := model.SkuNamePlaceBind{}
|
placeBind := &model.SkuNamePlaceBind{}
|
||||||
placeBind.PlaceCode = int(utils.Interface2Int64WithDefault(placeCode, 0))
|
placeBind.PlaceCode = int(utils.Interface2Int64WithDefault(placeCode, 0))
|
||||||
if placeBind.PlaceCode > 0 {
|
if placeBind.PlaceCode > 0 {
|
||||||
dao.WrapAddIDCULEntity(placeBind, userName)
|
dao.WrapAddIDCULEntity(placeBind, userName)
|
||||||
|
|||||||
Reference in New Issue
Block a user