扫码绑定打印机也要清空打印队列

This commit is contained in:
苏尹岚
2020-03-09 09:08:00 +08:00
parent bbd4d649c3
commit ebf5b66429
2 changed files with 2 additions and 1 deletions

View File

@@ -3851,7 +3851,7 @@ func BackUpStoreSkuBind(ctx *jxcontext.Context, isAsync, isContinueWhenError boo
snapshotAt = utils.Time2Date(time.Now())
)
storeSkuBindHis := &model.StoreSkuBindHistory{
SnapshotAt: snapshotAt.AddDate(0, 0, -3),
SnapshotAt: snapshotAt.AddDate(0, 0, -2),
}
storeSkuBindHis2 := &model.StoreSkuBindHistory{
SnapshotAt: snapshotAt,

View File

@@ -144,6 +144,7 @@ func BindPrinter(ctx *jxcontext.Context, storeID int, data string) (printResult
store.PrinterKey = bindResult.PrinterKey
store.PrinterBindInfo = string(utils.MustMarshal(bindResult))
if _, err = dao.UpdateEntity(db, store); err == nil {
err = handler.EmptyPrintList(ctx, bindResult.PrinterSN, bindResult.PrinterKey)
printResult, err = handler.GetPrinterStatus(ctx, bindResult.PrinterSN, bindResult.PrinterKey)
}
}