| | |
| | | { |
| | | q = q.Where(it => it.RecommendStatus == request.RecommendStatus); |
| | | } |
| | | var s = from t in q |
| | | var s = from t in q.Include(it => it.Province).Include(it => it.City) |
| | | join tu in rep.Change<TaskInfoUser>().AsQueryable().AsNoTracking() on t.Id equals tu.TaskInfoId into tug |
| | | join tb in rep.Change<TaskInfoBenefit>().AsQueryable().AsNoTracking().Include(it => it.Benefit) on t.Id equals tb.TaskInfoId into tbg |
| | | join tc in rep.Change<TaskInfoCredentialLimit>().AsQueryable().AsNoTracking().Include(it => it.Type) on t.Id equals tc.TaskInfoId into tcg |
| | | select new GetTaskInfosQueryResultItem |
| | | { |
| | | Id = t.Id, |
| | |
| | | BillingMethod = t.BillingMethod, |
| | | ServiceFee = t.ServiceFee, |
| | | SettlementCycle = t.SettlementCycle, |
| | | Benefits = tbg.Select(it => new GetTaskInfoQueryResultBenefit |
| | | { |
| | | BenefitCode = it.BenefitCode, |
| | | BenefitContent = it.Benefit.Content |
| | | }).ToList(), |
| | | GenderLimit = t.GenderLimit, |
| | | CredentialLimits = tcg.Select(it => new GetTaskInfoQueryResultCredentialLimit |
| | | { |
| | | TypeCode = it.TypeCode, |
| | | TypeContent = it.Type.Content |
| | | }).ToList(), |
| | | ProvinceCode = t.ProvinceCode, |
| | | ProvinceContent =t.Province.Content, |
| | | CityCode = t.CityCode, |
| | | CityContent = t.City.Content, |
| | | AddressName = t.AddressName, |
| | | AddressDetail = t.AddressDetail, |
| | | Latitude = t.Latitude, |
| | | Longitude = t.Longitude, |
| | | UserCount = tug.Count(), |
| | | Status = t.Status, |
| | | BeginTime = t.BeginTime, |