public void StartWork() { //time.Marke("1.启动锚点"); int lastExportID = 0; string actStr = _redisHelper.StringGet(SUCCESSACTIDQUEUEKEY); if (!string.IsNullOrEmpty(actStr)) { lastExportID = Convert.ToInt32(actStr); } //time.Marke("2.redis读取完毕"); IEnumerable <int> actIdList = _signPointActivityRepository.Query <int>("select distinct id from SignPointActivity where id>@rid and id<=@maxID and IsDelete=@isDelate", new { rid = lastExportID, isDelate = 0, maxID = 1400 }); //time.Marke("3.redis 执行 select distinct id from SignPointActivity where id>@rid 查询完毕"); //time.Marke("4.执行工作任务"); //执行任务 ExcuteWorker(actIdList); //time.Marke("5.工作任务执行完毕"); Console.WriteLine("运行完毕, 请清理活动表(SignActivity)下的RowId 。。。"); time.SaveData(); }