public List <ActivityMessageRemindModel> BeforeExecuteJob() { var list = new List <ActivityMessageRemindModel>(); var activtyProducts = DalActivity.SelectFlashSaleProductModels().ToList(); if (activtyProducts.Any()) { var pids = activtyProducts.Select(r => r.Pid); foreach (var enumerable in pids.Split(100).Select(_ => _.ToList())) { var datas = (DalActivity.SelectActivityMessageRemindModel(enumerable)).ToList(); if (datas.Any()) { list.AddRange(datas); } } ; var result = (from l in list join p in activtyProducts on l.Pid equals p.Pid select new ActivityMessageRemindModel { ActivityId = l.ActivityId, ActivityName = l.ActivityName, Pid = l.Pid, Pkid = l.Pkid, ProductName = l.ProductName, UserId = l.UserId, StartDtartTime = p.StartDateTime, }).ToList(); return(result); } return(list); }