This commit is contained in:
suyl
2021-07-13 18:07:05 +08:00
parent 572a14d171
commit ae1ee4d1cb

View File

@@ -278,11 +278,11 @@ func (c *ApiController) UpdatePrinter(dataMap map[string]interface{}) (data, err
} else { } else {
sound = &soundStr sound = &soundStr
} }
if volumeInt, ok := dataMap[keyVolume].(string); !ok { if volumeInt, ok := dataMap[keyVolume].(int); !ok {
volume = nil //volume = nil
return buildParamErrCodeAndErr(keyVolume)
} else { } else {
volumeStr := utils.Str2Int(volumeInt) volume = &volumeInt
volume = &volumeStr
} }
appID = utils.Str2Int(dataMap[keyAppID].(string)) appID = utils.Str2Int(dataMap[keyAppID].(string))
if err = cms.UpdatePrinter(appID, printNo, name, sim, sound, volume); err != nil { if err = cms.UpdatePrinter(appID, printNo, name, sim, sound, volume); err != nil {