This commit is contained in:
suyl
2021-10-20 09:44:55 +08:00
parent d47257e2fd
commit 73a31bf6dc

View File

@@ -5459,5 +5459,16 @@ func UpdateStoreTemplate(ctx *jxcontext.Context, storeID int, content, sound str
)
store.ID = storeID
dao.GetEntity(db, store)
configs, _ := dao.QueryConfigs(db, "jxPrintTemplate", model.ConfigTypeSys, "")
sysTemp := configs[0].Value
if strings.EqualFold(content, sysTemp) {
store.PrinterTemplate = ""
} else {
store.PrinterTemplate = content
}
if !strings.EqualFold(sound, store.PrinterSound) {
store.PrinterSound = sound
}
_, err = dao.UpdateEntity(db, store, "PrinterTemplate", "PrinterSound")
return err
}