public async Task <MessageModel <PageModel <TasksQz> > > Get(int page = 1, string key = "") { if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key)) { key = ""; } int intPageSize = 50; Expression <Func <TasksQz, bool> > whereExpression = a => a.IsDeleted != true && (a.Name != null && a.Name.Contains(key)); var data = await _tasksQzServices.QueryPage(whereExpression, page, intPageSize, " Id desc "); return(new MessageModel <PageModel <TasksQz> >() { msg = "获取成功", success = data.dataCount >= 0, response = data }); }
public async Task <MessageModel <PageModel <TasksQz> > > Get(int page = 1, string key = "") { if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key)) { key = ""; } int intPageSize = 50; Expression <Func <TasksQz, bool> > whereExpression = a => a.IsDeleted != true && (a.Name != null && a.Name.Contains(key)); var data = await _tasksQzServices.QueryPage(whereExpression, page, intPageSize, " Id desc "); if (data.dataCount > 0) { foreach (var item in data.data) { item.Triggers = await _schedulerCenter.GetTaskStaus(item); } } return(MessageModel <PageModel <TasksQz> > .Message(data.dataCount >= 0, "获取成功", data)); }