updateprinter

This commit is contained in:
suyl
2021-07-14 09:23:35 +08:00
parent ddfdd6c5c2
commit ce62b2d01a

View File

@@ -161,9 +161,11 @@ func UpdatePrinter(appID int, printNo string, name, sim, sound *string, volume *
} }
} }
if sound != nil { if sound != nil {
if *sound != "" {
if soundMap[*sound] == "" { if soundMap[*sound] == "" {
return fmt.Errorf("请输入正确的提示音print_no : %v ", printNo) return fmt.Errorf("请输入正确的提示音print_no : %v ", printNo)
} }
}
if printers[0].Sound != *sound { if printers[0].Sound != *sound {
printers[0].Sound = *sound printers[0].Sound = *sound
fields = append(fields, "sound") fields = append(fields, "sound")