This commit is contained in:
邹宗楠
2022-12-16 11:50:43 +08:00
parent b0631f4eeb
commit cf7471444a
2 changed files with 2 additions and 3 deletions

View File

@@ -955,7 +955,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
}
valid["printerBindInfo"] = ""
if handler := partner.GetPrinterPlatformFromVendorID(store.PrinterVendorID); handler != nil {
handler.UnregisterPrinter(ctx, store.PrinterSN, store.PrinterKey)
handler.UnregisterPrinter(ctx, store.PrinterSN, utils.Int2Str(store.ID))
}
}
if valid["soundPercentage"] != nil && valid["printerSN"] != nil {

View File

@@ -72,10 +72,9 @@ func (c *PrinterHandler) RegisterPrinter(ctx *jxcontext.Context, id1, id2, print
return "", "", err
}
// UnregisterPrinter
func (c *PrinterHandler) UnregisterPrinter(ctx *jxcontext.Context, id1, id2 string) (err error) {
if globals.EnableStoreWrite {
err = api.JxPrintAPI.DelPrinter([]string{id1})
err = api.JxPrintAPI.DelPrinter([]string{id1}, id2)
}
return err
}