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

View File

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