using DispenserCommon.DB; using DispenserCommon.Ioc; using DispenserCommon.Utils; using DispenserCore.Model.Entity; namespace DispenserCore.Service; /// /// 日志参数业务接口 /// [Component] public class LogParamsService { private readonly SqliteHelper _db = ServiceLocator.GetService(); /// /// 获取算法参数 /// /// public LogParams? GetLogParams() { return _db.Query("select * from log_params limit 1") .FirstOrDefault(); } /// /// 保存或者更新系统参数 /// /// /// public LogParams SaveOrUpdate(LogParams @params) { return _db.SaveOrUpdate(@params); } /// /// 清除历史纪录 /// /// public void Delete(string id) { _db.DeleteById(id); } }