Ejemplo n.º 1
0
        /// <summary>
        /// 获取Job运行日志列表
        /// </summary>
        public IEnumerable <JobExecuteLog> GetJobExecuteLogList(int jobId, DateTime startTime, DateTime endTime, PageItem pageItem)
        {
            string sql = string.Format("SELECT ID,JobId,ExecuteTime,Success FROM JobExecuteLog WITH(NOLOCK) WHERE JobId={0} AND ExecuteTime BETWEEN '{1}' AND '{2}' ORDER BY ID DESC ", jobId, startTime.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"));

            return(DapperHelper <JobExecuteLog> .GetPageList(ConnectionStr.FxDb, sql, pageItem));
        }