using WcsMain.Common; using WcsMain.DataBase.TableEntity; using WcsMain.WcsAttribute.AutoFacAttribute; namespace WcsMain.DataBase.Dao; [Component] public class AppRouterMethodDao { /// /// 查询数据 /// /// /// public List? Query(AppRouterMethod routerMethod) { try { var sqlFuc = CommonTool.DbServe.Queryable() .WhereIF(routerMethod.Area != default, w => w.Area == routerMethod.Area) .WhereIF(routerMethod.ClassName != default, w => w.ClassName == routerMethod.ClassName) .WhereIF(routerMethod.RouterStatus != default, w => w.RouterStatus == routerMethod.RouterStatus) .WhereIF(routerMethod.ReadFailRouter != default, w => w.ReadFailRouter == routerMethod.ReadFailRouter) .WhereIF(routerMethod.ErrRouter != default, w => w.ErrRouter == routerMethod.ErrRouter) .WhereIF(routerMethod.AllowDirection != default, w => w.AllowDirection == routerMethod.AllowDirection) .WhereIF(routerMethod.Remark != default, w => w.Remark == routerMethod.Remark); return sqlFuc.ToList(); } catch(Exception ex) { _ = ex; return default; } } /// /// 查询所有 /// /// public List? Query() => Query(new AppRouterMethod()); }