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 }