- 因为在UpdateStore是存的valid,所以在调用打印机处理相关的函数后按store更新valid
This commit is contained in:
@@ -384,6 +384,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
store.PrinterSN = ""
|
||||
store.PrinterKey = ""
|
||||
store.PrinterVendorID = printerVendorID
|
||||
valid["printerSN"], valid["printerKey"] = store.PrinterSN, store.PrinterKey
|
||||
}
|
||||
}
|
||||
if valid["printerSN"] != nil || valid["printerKey"] != nil {
|
||||
@@ -400,6 +401,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
if err = handler.RegisterPrinter(ctx, store, valid["printerSN"].(string), valid["printerKey"].(string)); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
valid["printerSN"], valid["printerKey"] = store.PrinterSN, store.PrinterKey
|
||||
}
|
||||
|
||||
for _, v := range []string{
|
||||
|
||||
Reference in New Issue
Block a user