public IActionResult Get(int id) { var entity = _resumeService.GetById(id); var model = entity.ToModel(); //locals AddLocales(_languageWebApi, model.Locales, (locale, languageId) => { locale.Summary = entity.GetLocalized(x => x.Summary, languageId, false, false); }); return(Ok(model)); }
public IActionResult GetById(string id) { var interview = _iInterviewService.GetById(id); var interviewModels = _iMapper.Map <InterviewModels>(interview); var post = _iPostService.GetById(interview.PostId); var postModel = _iMapper.Map <PostModel>(post); var resume = _iResumeService.GetById(interview.ResumeId); var resumeModel = _iMapper.Map <ResumeModel>(resume); var company = _iCompanyService.GetById(post.CompanyId); var companyModel = _iMapper.Map <ResponseCompanyUserModel>(company); var user = _iUserService.GetById(resume.UserId); var userModel = _iMapper.Map <ResponseUserModel>(user); interviewModels.postModel = postModel; interviewModels.resumeModel = resumeModel; interviewModels.companyUserModel = companyModel; interviewModels.userModel = userModel; var count = 1; if (resumeModel != null) { return(Output( interviewModels, count)); } throw new Exception("该面试邀请不存在"); }
public IActionResult GetById(string id) { var resume = _iResumeService.GetById(id); var resumeModel = _iMapper.Map <ResponseResumeModel>(resume); var user = _iUserService.GetById(resume.UserId); var userModel = _iMapper.Map <ResponseUserModel>(user); resumeModel.responseUserModel = userModel; var count = 1; if (resumeModel != null) { return(Output(resumeModel, count)); } throw new Exception("该简历不存在"); }
public IActionResult GetById(string id) { var recommend = _iRecommendService.GetById(id); var recommendModel = _iMapper.Map <RecommendModels>(recommend); var post = _iPostService.GetById(recommendModel.PostId); var postModel = _iMapper.Map <PostModel>(post); var resume = _iResumeService.GetById(recommendModel.ResumeId); var resumeModel = _iMapper.Map <ResumeModel>(resume); var company = _iCompanyService.GetById(post.CompanyId); var companyModel = _iMapper.Map <ResponseCompanyUserModel>(company); var user = _iUserService.GetById(resume.UserId); var userModel = _iMapper.Map <ResponseUserModel>(user); recommendModel.postModel = postModel; recommendModel.resumeModel = resumeModel; recommendModel.companyUserModel = companyModel; recommendModel.userModel = userModel; var count = 1; if (recommendModel != null) { return(Output( recommendModel, count)); } throw new Exception("该推荐不存在"); }
public resume getResume(int resumeId) { return(resumes.GetById(resumeId)); }