From 73a31bf6dcaaed14dd50f87c42a69725d82ab041 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Wed, 20 Oct 2021 09:44:55 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index e1cba5196..8586fc310 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -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 }