取消打印机sim
This commit is contained in:
@@ -84,9 +84,9 @@ func AddPrinter(appID int, printers []*model.Printer) (err error) {
|
|||||||
|
|
||||||
func checkPrinterInfo(printNo, name, sound, sim string, volume int) (err error) {
|
func checkPrinterInfo(printNo, name, sound, sim string, volume int) (err error) {
|
||||||
if sim != "" {
|
if sim != "" {
|
||||||
if regexpMobile.FindString(sim) == "" {
|
//if regexpMobile.FindString(sim) == "" {
|
||||||
return fmt.Errorf("请输入正确的sim卡号码!print_no : %v ", printNo)
|
return fmt.Errorf("暂不支持修改sim卡号码!print_no : %v ", printNo)
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
if volume != 0 {
|
if volume != 0 {
|
||||||
if volume <= 0 || volume > 5 {
|
if volume <= 0 || volume > 5 {
|
||||||
@@ -151,14 +151,14 @@ func UpdatePrinter(appID int, printNo string, name, sim, sound *string, volume *
|
|||||||
}
|
}
|
||||||
if sim != nil {
|
if sim != nil {
|
||||||
if *sim != "" {
|
if *sim != "" {
|
||||||
if regexpMobile.FindString(*sim) == "" {
|
//if regexpMobile.FindString(*sim) == "" {
|
||||||
return fmt.Errorf("请输入正确的sim卡号码!print_no : %v ", printNo)
|
return fmt.Errorf("暂不支持修改sim卡号码!print_no : %v ", printNo)
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
if printers[0].SIM != *sim {
|
|
||||||
printers[0].SIM = *sim
|
|
||||||
fields = append(fields, "sim")
|
|
||||||
}
|
}
|
||||||
|
//if printers[0].SIM != *sim {
|
||||||
|
// printers[0].SIM = *sim
|
||||||
|
// fields = append(fields, "sim")
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
if sound != nil {
|
if sound != nil {
|
||||||
if *sound != "" {
|
if *sound != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user