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 {
sound = &soundStr
}
if volumeInt, ok := dataMap[keyVolume].(string); !ok {
volume = nil
if volumeInt, ok := dataMap[keyVolume].(int); !ok {
//volume = nil
return buildParamErrCodeAndErr(keyVolume)
} else {
volumeStr := utils.Str2Int(volumeInt)
volume = &volumeStr
volume = &volumeInt
}
appID = utils.Str2Int(dataMap[keyAppID].(string))
if err = cms.UpdatePrinter(appID, printNo, name, sim, sound, volume); err != nil {