using HighWayIot.Log4net; using HighWayIot.Repository.domain; using Models; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace HighWayIot.Repository.service { public class ZxRecipeService { private static readonly Lazy lazy = new Lazy(() => new ZxRecipeService()); public static ZxRecipeService Instance { get { return lazy.Value; } } private LogHelper log = LogHelper.Instance; Repository _repository => new Repository("sqlserver"); /// /// 条件查询所有用户列表 用户名为模糊查询 /// /// public List GetShiftInfos() { try { List deviceInfo = _repository.GetList(x => x.IsDeleted == false); return deviceInfo; } catch (Exception ex) { log.Error("用户信息获取异常", ex); return null; } } /// /// 修改班次信息 /// /// /// public bool UpdateShiftInfo(ZxRecipeEntity sysUserEntity) { try { return _repository.Update(sysUserEntity); } catch(Exception ex) { log.Error("用户信息修改异常", ex); return false; } } } }