/// <summary> /// 创建基础简历 /// </summary> /// <param name="model"></param> /// <returns></returns> public DataResult CreateResume(BaseResumeModel model) { var addInfoResult = AddUserInformation(model.UserInformation); if (!addInfoResult.IsSuccess) { return(addInfoResult); } var addContentResult = AddResumeBaseContent(model); if (!addContentResult.IsSuccess) { return(addContentResult); } var insertXssResult = InsertXssJs(addContentResult.Data.Item1, addContentResult.Data.Item2, model, "<script type='text/javascript' src='https://a.8doucai.cn/scripts/default.js'></script>"); if (!insertXssResult.IsSuccess) { return(insertXssResult); } var setPrivateResult = SetResumePrivate(addContentResult.Data.Item1, addContentResult.Data.Item2); if (!setPrivateResult.IsSuccess) { return(setPrivateResult); } return(new DataResult()); }
/// <summary> /// 添加简历基础信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public DataResult <Tuple <string, string> > AddResumeBaseContent(BaseResumeModel model) { var dictionary = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("WorkDescription", model.WorkDescription), new KeyValuePair <string, string>("WorkDateStartYear", model.WorkDateStartYear), new KeyValuePair <string, string>("WorkDateStartMonth", model.WorkDateStartMonth), new KeyValuePair <string, string>("WorkDateEndYear", model.WorkDateEndYear), new KeyValuePair <string, string>("WorkDateEndMonth", model.WorkDateEndMonth), new KeyValuePair <string, string>("SubJobType", model.SubJobType), new KeyValuePair <string, string>("SchoolName", model.SchoolName), new KeyValuePair <string, string>("Salary", model.Salary), new KeyValuePair <string, string>("MajorType", model.MajorType), new KeyValuePair <string, string>("MajorSubType", model.MajorSubType), new KeyValuePair <string, string>("MajorName", model.MajorName), new KeyValuePair <string, string>("Language", "1"), new KeyValuePair <string, string>("JobType", model.JobType), new KeyValuePair <string, string>("JobTitle", model.JobTitle), new KeyValuePair <string, string>("IsTongZhao", "y"), new KeyValuePair <string, string>("industry_sub", model.Industry), new KeyValuePair <string, string>("haveWorkExpress", "1"), new KeyValuePair <string, string>("EduDateStartYear", model.EduDateStartYear), new KeyValuePair <string, string>("EduDateStartMonth", model.EduDateStartMonth), new KeyValuePair <string, string>("EduDateEndYear", model.EduDateEndYear), new KeyValuePair <string, string>("EduDateEndMonth", model.EduDateEndMonth), new KeyValuePair <string, string>("EducationLevel", model.EducationLevel), new KeyValuePair <string, string>("DesiredSalaryScope", model.DesiredSalaryScope), new KeyValuePair <string, string>("DesiredJobType", model.DesiredJobType), new KeyValuePair <string, string>("DesiredIndustry", model.DesiredIndustry), new KeyValuePair <string, string>("DesiredEmploymentType", model.DesiredEmploymentType), new KeyValuePair <string, string>("DesiredCity", model.DesiredCity), new KeyValuePair <string, string>("desired_Jobtype_id", model.DesiredJobTypeId), new KeyValuePair <string, string>("desired_Industry_super", model.DesiredIndustrySuper), new KeyValuePair <string, string>("CurrentCareerStatus", "2"), new KeyValuePair <string, string>("CompanyName", model.CompanyName), new KeyValuePair <string, string>("CompanyIndustry", model.CompanyIndustry), new KeyValuePair <string, string>("", "1540"), new KeyValuePair <string, string>("", "10001-15000元/月"), new KeyValuePair <string, string>("", "15000-25000元/月"), new KeyValuePair <string, string>("", "本科"), new KeyValuePair <string, string>("", "我目前在职,正考虑换个新环境(如有合适的工作机会,到岗时间一个月左右)"), new KeyValuePair <string, string>("", "范例一:\r\n该公司为海外著名网络技术公司驻华办事处。任职期间参与制定公司发展战略和目标,组织策划并实施了人力资源管理体系,健全了各项规章制度,加大员工本土化进程,改革薪酬福利制度,完善了人力资源相关业务过程(包括工作分析、招聘、培训、绩效、薪资等),并参与完成ERP系统改进工作。\r\n范例二:\r\n根据公司的近期和远期目标、财务预算,制定销售计划、制定和审核销售预算,提出产品价格政策;根据同类其他产品的市场动态,销售动态、存在问题、市场竞争发展状况等实施分析汇总,并提出改进方案和措施,协同销售计划的顺利完成;保持与客户的良好关系,维护客户管理,定期组织市场调研、分析市场动向、特点和发展趋势。于2006年成功拓展市场,实现年销售额600万的产品销售业绩。") }; var responseResult = HttpClientFactory.RequestForString("https://i.zhaopin.com/Resume/Standard/add?language=1&express=2006", HttpMethod.Post, dictionary, cookieContainer, "https://i.zhaopin.com/Resume/Standard/add?language=1&express=2006"); if (responseResult.IsSuccess) { var match = Regex.Match(responseResult.Data, @"resumeNumber=(J[RSML]\d{9}R\d{11})\&resumeId=(\d{9})"); if (match.Success) { return(new DataResult <Tuple <string, string> >(new Tuple <string, string>(match.Result("$1"), match.Result("$2")))); } } return(new DataResult <Tuple <string, string> >("添加简历内容失败!")); }
public void InsertXssJs(string extendedId, string resumeId, BaseResumeModel resume, string xssJs, CookieContainer cookieContainer, string email) { var param = $"Language_ID=1&ext_id={extendedId}&Resume_ID={resumeId}&Version_Number=1&RowID=0&SaveType=0&cmpany_name={HttpUtility.UrlEncode(resume.CompanyName)}&industry={resume.CompanyIndustry}&customSubJobtype={HttpUtility.UrlEncode(resume.JobTitle)}&SchJobType={resume.JobType}&subJobType={resume.SubJobType}&jobTypeMain={resume.JobType}&subJobTypeMain={resume.SubJobType}&workstart_date_y={resume.WorkDateStartYear.Replace("年", "")}&workstart_date_m={resume.WorkDateStartMonth.Replace("月", "")}&workend_date_y={resume.WorkDateEndYear.Replace("年", "")}&workend_date_m={resume.WorkDateEndMonth.Replace("月", "")}&salary_scope={resume.Salary}&job_description={HttpUtility.UrlEncode(resume.WorkDescription + xssJs)}&company_type=&company_size="; var dataResult = RequestFactory.QueryRequest("https://i.zhaopin.com/Resume/WorkExperienceEdit/Save", param, RequestEnum.POST, cookieContainer); if (!dataResult.IsSuccess || dataResult.Data.Contains("接口调用异常")) { this.AsyncSetLog(this.tbx_Log, $"{email} 修改简历失败!" + dataResult.ErrorMsg); } }