public IActionResult ResumeUpdate(int?id) { if (id == null) { return(NotFound()); } var entity = _resumeRepository.GetById((int)id); if (entity == null) { return(NotFound()); } var model = new ResumeModel() { ResumeId = entity.ResumeId, Title = entity.Title, Company = entity.Company, Description = entity.Description, Job = entity.Job, StartDate = entity.StartDate, FinishDate = entity.FinishDate }; return(View(model)); }
public void Delete(string resumeId) { var resume = _iResumeRepository.GetById(resumeId); if (resume != null) { _iResumeRepository.Remove(resume); } }
public Recommend Create(Recommend recommends, string postId, string resumeId) { // 验证 if (string.IsNullOrWhiteSpace(postId)) { throw new AppException("职位id不能为空!"); } if (string.IsNullOrWhiteSpace(resumeId)) { throw new AppException("简历id不能为空!"); } var post = _iPostRepository.GetById(postId); if (post == null) { throw new AppException("该职位不存在!"); } var resume = _iResumeRepository.GetById(resumeId); if (resume == null) { throw new AppException("该简历不存在!"); } IEnumerable <Recommend> _recommendForResume = _iRecommendRepository.GetIdByPostIdAndResumeId(postId, resumeId); if (_recommendForResume.Count() > 0) { foreach (var ls in _recommendForResume) { recommends.RecommendId = ls.RecommendId; recommends.RecommendUpdateTime = DateTime.Now; } _iRecommendRepository.Update(recommends); return(recommends); } recommends.RecommendId = Guid.NewGuid().ToString(); recommends.PostId = postId; recommends.ResumeId = resumeId; recommends.CompanyId = recommends.CompanyId; recommends.RecommendNumber = recommends.RecommendNumber; recommends.RecommendUpdateTime = DateTime.Now; _iRecommendRepository.Add(recommends); return(recommends); }
public async Task <ResumeDTO> Handle(ModifyResume request, CancellationToken cancellationToken) { var resume = await _repository.GetById(request.ResumeId.ToString()); resume.ModifyResume(request.FirstName, request.LastName); await _repository.SaveAsync(resume); return(_mapper.Map <ResumeDTO>(resume)); }
public Delivery Create(Delivery delivery, string postId, string resumeId) { // 验证 if (string.IsNullOrWhiteSpace(resumeId)) { throw new AppException("简历id不能为空!"); } if (string.IsNullOrWhiteSpace(postId)) { throw new AppException("职位id不能为空!"); } var post = _iPostRepository.GetById(postId); if (post == null) { throw new AppException("该职位不存在!"); } var resume = _iResumeRepository.GetById(resumeId); if (resume == null) { throw new AppException("该简历不存在!"); } if (delivery.CompanyId == null) { throw new AppException("该公司不存在!"); } delivery.DeliveryId = Guid.NewGuid().ToString(); delivery.PostId = postId; delivery.ResumeId = resumeId; delivery.CompanyId = delivery.CompanyId; delivery.DeliveryUpdateTime = DateTime.Now; _iDeliveryRepository.Add(delivery); return(delivery); }
public Interview Create(Interview interview, string postId, string resumeId) { // 验证 if (string.IsNullOrWhiteSpace(resumeId)) { throw new AppException("简历id不能为空!"); } if (string.IsNullOrWhiteSpace(postId)) { throw new AppException("职位id不能为空!"); } var post = _iPostRepository.GetById(postId); if (post == null) { throw new AppException("该职位不存在!"); } var resume = _iResumeRepository.GetById(resumeId); if (resume == null) { throw new AppException("该简历不存在!"); } if (interview.CompanyId == null) { throw new AppException("该公司不存在!"); } interview.InterviewId = Guid.NewGuid().ToString(); interview.PostId = postId; interview.ResumeId = resumeId; interview.CompanyId = interview.CompanyId; interview.InterviewUpdateTime = DateTime.Now; _iInterviewRepository.Add(interview); return(interview); }
public async Task <ResumeDTO> Handle(GetResumeQuery request, CancellationToken cancellationToken) { var resume = await _repository.GetById(request.ResumeId); return(_mapper.Map <ResumeDTO>(resume)); }
public Resume GetResume(int id) { var cv = resumeRepository.GetById(id); return(cv); }