aa
This commit is contained in:
@@ -5459,5 +5459,16 @@ func UpdateStoreTemplate(ctx *jxcontext.Context, storeID int, content, sound str
|
|||||||
)
|
)
|
||||||
store.ID = storeID
|
store.ID = storeID
|
||||||
dao.GetEntity(db, store)
|
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
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user