This commit is contained in:
Unique-Jerry 2023-12-04 16:01:42 +08:00
parent f8ca479a7a
commit 375ee8cce5
8 changed files with 318 additions and 207 deletions

View File

@ -24,6 +24,8 @@ public class RecruitmentController {
private InterviewSettingService interviewSettingService; private InterviewSettingService interviewSettingService;
@Autowired @Autowired
private CompanyService companyService; private CompanyService companyService;
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "address",required = true), @ApiImplicitParam(name = "address",required = true),
@ApiImplicitParam(name = "addressDetail",required = true), @ApiImplicitParam(name = "addressDetail",required = true),
@ -132,17 +134,17 @@ public class RecruitmentController {
Integer id=(Integer) updateInfo.get("id"); Integer id=(Integer) updateInfo.get("id");
List<String> address=(List<String>) updateInfo.get("address"); List<String> address=(List<String>) updateInfo.get("address");
String encoding=(String) updateInfo.get("encoding"); String encoding=(String) updateInfo.get("encoding");
String address_detail=(String) updateInfo.get("address_detail"); String address_detail=(String) updateInfo.get("addressDetail");
Integer jobType=(Integer) updateInfo.get("jobType"); Integer jobType=(Integer) updateInfo.get("jobType");
Integer userId=(Integer) updateInfo.get("userId"); Integer userId=(Integer) updateInfo.get("userId");
String details=(String) updateInfo.get("details"); String details=(String) updateInfo.get("details");
String jobName=(String) updateInfo.get("jobName"); String jobName=(String) updateInfo.get("jobName");
String startTime=(String) updateInfo.get("startTime"); String startTime=(String) updateInfo.get("startTime");
String endTime=(String) updateInfo.get("endTime"); String endTime=(String) updateInfo.get("endTime");
String min_salary=(String) updateInfo.get("min_salary"); String min_salary=(String) updateInfo.get("minSalary");
String max_salary=(String) updateInfo.get("max_salary"); String max_salary=(String) updateInfo.get("maxSalary");
String min_number=(String) updateInfo.get("min_number"); String min_number=(String) updateInfo.get("minNumber");
String max_number=(String) updateInfo.get("max_number"); String max_number=(String) updateInfo.get("maxNumber");
List<String> jobTips=(List<String>) updateInfo.get("jobTips"); List<String> jobTips=(List<String>) updateInfo.get("jobTips");
Integer requirement=(Integer) updateInfo.get("requirement"); Integer requirement=(Integer) updateInfo.get("requirement");

View File

@ -2,6 +2,7 @@ package com.yzdx.AiInterviewer.controller.VxController;
import com.yzdx.AiInterviewer.comment.R; import com.yzdx.AiInterviewer.comment.R;
import com.yzdx.AiInterviewer.entity.JobExpectation; import com.yzdx.AiInterviewer.entity.JobExpectation;
import com.yzdx.AiInterviewer.entity.Resume;
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto; import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity; import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity;
import com.yzdx.AiInterviewer.service.ResumeService; import com.yzdx.AiInterviewer.service.ResumeService;
@ -26,13 +27,11 @@ import java.util.List;
public class VxUserController { public class VxUserController {
@Autowired @Autowired
private ResumeService resumeService; private ResumeService resumeService;
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired @Autowired
private VxCompanyLikeService vxCompanyLikeService; private VxCompanyLikeService vxCompanyLikeService;
@Autowired
private VxHelpService vxHelpService; private VxHelpService vxHelpService;
@ -40,7 +39,6 @@ public class VxUserController {
@ApiImplicitParam(name = "js_code", required = true) @ApiImplicitParam(name = "js_code", required = true)
} }
) )
@ResponseBody
@ApiOperation(value = "求职者登陆(vx)",notes = "") @ApiOperation(value = "求职者登陆(vx)",notes = "")
@PostMapping("/WxLogin") @PostMapping("/WxLogin")
public R<String> R (@RequestParam(value = "js_code", required = true) String js_code) throws Exception { public R<String> R (@RequestParam(value = "js_code", required = true) String js_code) throws Exception {
@ -93,7 +91,6 @@ public class VxUserController {
/** /**
*填写简历 *填写简历
*/ */
@ResponseBody
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "name",required = true), @ApiImplicitParam(name = "name",required = true),
@ApiImplicitParam(name = "status",required = true), @ApiImplicitParam(name = "status",required = true),
@ -121,19 +118,20 @@ public class VxUserController {
@RequestParam(required = true, value = "vx") String vx, @RequestParam(required = true, value = "vx") String vx,
@RequestParam(required = true, value = "personalAdvantage") String personalAdvantage, @RequestParam(required = true, value = "personalAdvantage") String personalAdvantage,
@RequestParam(required = true, value = "other") String other, @RequestParam(required = true, value = "other") String other,
@RequestParam(required = true, value = "jobExpectation") List<Integer> jobExpectation, @RequestParam(required = true, value = "education_background") String education_background,
@RequestParam(required = true, value = "workExperience") List<String> workExperience, @RequestParam(required = true, value = "jobExpectation") String jobExpectation,
@RequestParam(required = true, value = "projectExperience") List<String> projectExperience, @RequestParam(required = true, value = "workExperience") String workExperience,
@RequestParam(required = true, value = "projectExperience") String projectExperience,
@RequestParam(required = true, value = "userId") Integer userId, @RequestParam(required = true, value = "userId") Integer userId,
@RequestParam(required = true, value = "sex") String sex){ @RequestParam(required = true, value = "sex") String sex){
Integer rows = resumeService.writeResume( name, avatar,sex, status, graduateTime, birthday, phone, email, vx, personalAdvantage, Integer rows = resumeService.writeResume( name, avatar,sex, status, graduateTime, birthday, phone,
other,jobExpectation,workExperience,projectExperience,userId); email, vx, personalAdvantage,
other,education_background,jobExpectation,workExperience,projectExperience,userId);
if(rows!=1){ if(rows!=1){
return R.error("提交失败,请重新输入"); return R.error("提交失败,请重新输入");
} }
return R.success("提交简历信息成功"); return R.success("提交简历信息成功");
} }
/** /**
*更新简历 *更新简历
*/ */
@ -155,7 +153,6 @@ public class VxUserController {
@ApiImplicitParam(name = "sex",required = true), @ApiImplicitParam(name = "sex",required = true),
}) })
@PostMapping("/update_resume") @PostMapping("/update_resume")
public R updateResume(@RequestParam(required = true, value = "name") String name, public R updateResume(@RequestParam(required = true, value = "name") String name,
@RequestParam(required = true, value = "id") Integer id, @RequestParam(required = true, value = "id") Integer id,
@ -168,93 +165,106 @@ public class VxUserController {
@RequestParam(required = true, value = "vx") String vx, @RequestParam(required = true, value = "vx") String vx,
@RequestParam(required = true, value = "personalAdvantage") String personalAdvantage, @RequestParam(required = true, value = "personalAdvantage") String personalAdvantage,
@RequestParam(required = true, value = "other") String other, @RequestParam(required = true, value = "other") String other,
@RequestParam(required = true, value = "jobExpectation") List<Integer> jobExpectation, @RequestParam(required = true, value = "education_background") String education_background,
@RequestParam(required = true, value = "workExperience") List<String> workExperience, @RequestParam(required = true, value = "jobExpectation") String jobExpectation,
@RequestParam(required = true, value = "projectExperience") List<String> projectExperience, @RequestParam(required = true, value = "workExperience") String workExperience,
@RequestParam(required = true, value = "projectExperience") String projectExperience,
@RequestParam(required = true, value = "userId") Integer userId, @RequestParam(required = true, value = "userId") Integer userId,
@RequestParam(required = true, value = "sex") String sex){ @RequestParam(required = true, value = "sex") String sex
){
Integer rows = resumeService.updateResume(id,name,avatar, sex, status, graduateTime, Integer rows = resumeService.updateResume(id,name,avatar, sex, status, graduateTime,
birthday, phone, email, vx, personalAdvantage, birthday, phone, email, vx, personalAdvantage,
other,jobExpectation,workExperience,projectExperience,userId); other,education_background,jobExpectation,workExperience,projectExperience,userId);
if(rows!=1){ if(rows!=1){
return R.error("提交失败,请重新输入"); return R.error("提交失败,请重新输入");
} }
return R.success("提交简历信息成功"); return R.success("提交简历信息成功");
} }
@GetMapping("/getResume")
public R getResume(Integer userId){
Resume resume= resumeService.getResume(userId);
return R.success(resume);
}
/**
* 获取简历列表
* */
/** /**
* 添加岗位期望 * 添加岗位期望
*/ */
@ApiImplicitParams({ // @ApiImplicitParams({
@ApiImplicitParam(name = "expectationType",required = true), // @ApiImplicitParam(name = "expectationType",required = true),
@ApiImplicitParam(name = "position",required = true), // @ApiImplicitParam(name = "position",required = true),
@ApiImplicitParam(name = "location",required = true), // @ApiImplicitParam(name = "location",required = true),
@ApiImplicitParam(name = "userId",required = true), // @ApiImplicitParam(name = "userId",required = true),
@ApiImplicitParam(name = "salary",required = true), // @ApiImplicitParam(name = "salary",required = true),
}) // })
@PostMapping("/add_jobExpectation") // @PostMapping("/add_jobExpectation")
public R addJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType, // public R addJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
@RequestParam(required = true, value = "position") String position, // @RequestParam(required = true, value = "position") String position,
@RequestParam(required = true, value = "location") String location, // @RequestParam(required = true, value = "location") String location,
@RequestParam(required = true, value = "salary") String salary, // @RequestParam(required = true, value = "salary") String minSalary,
@RequestParam(required = true, value = "userId") Integer userId) // @RequestParam(required = true, value = "salary") String maxSalary,
{ // @RequestParam(required = true, value = "userId") Integer userId) {
Integer rows= resumeService.addJobExpectation(expectationType,position,location,salary,userId); // String salary=minSalary+maxSalary;
if(rows!=1){ // Integer rows= resumeService.addJobExpectation(expectationType,position,location,salary,userId);
return R.error("保存失败,请重新输入"); // if(rows!=1){
} // return R.error("保存失败,请重新输入");
return R.success("保存岗位期望成功"); // }
} // return R.success("保存岗位期望成功");
// }
/** //
* 获取岗位期望列表 // /**
* @return // * 获取岗位期望列表
*/ // * @return
// */
@GetMapping("/getJobExpectation") //
public R getJobExpectation(@ApiParam("Integer userId") Integer userId){ // @GetMapping("/getJobExpectation")
List<JobExpectation> list= resumeService.getJobExpectation(userId); // public R getJobExpectation(@ApiParam("Integer userId") Integer userId){
return R.success(list); // List<JobExpectation> list= resumeService.getJobExpectation(userId);
} // return R.success(list);
// }
/** //
* 更新岗位期望信息 // /**
*/ // * 更新岗位期望信息
@ResponseBody // */
@ApiImplicitParams({ // @ResponseBody
@ApiImplicitParam(name = "expectationType",required = true), // @ApiImplicitParams({
@ApiImplicitParam(name = "position",required = true), // @ApiImplicitParam(name = "expectationType",required = true),
@ApiImplicitParam(name = "location",required = true), // @ApiImplicitParam(name = "position",required = true),
@ApiImplicitParam(name = "userId",required = true), // @ApiImplicitParam(name = "location",required = true),
@ApiImplicitParam(name = "salary",required = true), // @ApiImplicitParam(name = "userId",required = true),
}) // @ApiImplicitParam(name = "salary",required = true),
@PostMapping("/updateJobExpectation") // })
public R updateJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType, // @PostMapping("/updateJobExpectation")
@RequestParam(required = true, value = "position") String position, // public R updateJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
@RequestParam(required = true, value = "id") Integer id, // @RequestParam(required = true, value = "position") String position,
@RequestParam(required = true, value = "location") String location, // @RequestParam(required = true, value = "id") Integer id,
@RequestParam(required = true, value = "salary") String salary, // @RequestParam(required = true, value = "location") String location,
@RequestParam(required = true, value = "userId") Integer userId){ // @RequestParam(required = true, value = "salary") String salary,
Integer rows= resumeService.updateJobExpectation(id,expectationType,position,location,salary,userId); // @RequestParam(required = true, value = "userId") Integer userId){
if(rows!=1){ // Integer rows= resumeService.updateJobExpectation(id,expectationType,position,location,salary,userId);
return R.error("保存失败,请重新输入"); // if(rows!=1){
} // return R.error("保存失败,请重新输入");
return R.success("保存岗位期望成功"); // }
} // return R.success("保存岗位期望成功");
// }
/** //
* 删除岗位期望 // /**
* @param id // * 删除岗位期望
* @return // * @param id
*/ // * @return
@DeleteMapping("/deleteJobExpectation") // */
public R deleteJobExpectation(Integer id){ // @DeleteMapping("/deleteJobExpectation")
Integer rows= resumeService.deleteJobExpectation(id); // public R deleteJobExpectation(Integer id){
if(rows==-2){ // Integer rows= resumeService.deleteJobExpectation(id);
return R.error("删除失败"); // if(rows==-2){
} // return R.error("删除失败");
return R.success("删除成功"); // }
} // return R.success("删除成功");
// }
@GetMapping("/getHelpList") @GetMapping("/getHelpList")
@ -277,9 +287,7 @@ public class VxUserController {
@RequestParam(required = true, value = "encoding") String encoding, @RequestParam(required = true, value = "encoding") String encoding,
@RequestParam(required = true, value = "password") String password){ @RequestParam(required = true, value = "password") String password){
return userService.adminLogin(phone, encoding, password); return userService.adminLogin(phone, encoding, password);
} }

View File

@ -18,9 +18,13 @@ public class Resume extends BaseEntity{
private String avatar; private String avatar;
@ApiModelProperty("名字") @ApiModelProperty("名字")
private String name; private String name;
@ApiModelProperty("年龄")
private Integer Age;
@ApiModelProperty("性别") @ApiModelProperty("性别")
private String sex; private String sex;
@ApiModelProperty("教育背景") @ApiModelProperty("学历")
private String education;
@ApiModelProperty("教育经历")
private String educationBackground; private String educationBackground;
@ApiModelProperty("身份") @ApiModelProperty("身份")
private String status; private String status;
@ -48,8 +52,6 @@ public class Resume extends BaseEntity{
private String projectExperience; private String projectExperience;
@ApiModelProperty("其它") @ApiModelProperty("其它")
private String other; private String other;
@ApiModelProperty("创建时间")
private String createTime;
@ApiModelProperty("投简历人的id") @ApiModelProperty("投简历人的id")
private Integer userId; private Integer userId;
} }

View File

@ -0,0 +1,30 @@
package com.yzdx.AiInterviewer.entity;
import lombok.Data;
import java.util.Date;
@Data
public class jobPosting extends BaseEntity{
private Integer id;
private String companyEncoding;
private String recruitmentName;
private Date startTime;
private Date endTime;
private String jobId;
private String interviewQuestions;
private String promote;
private Integer interviewee;
private String contact;
}

View File

@ -1,8 +1,10 @@
package com.yzdx.AiInterviewer.entity.vxEntity; package com.yzdx.AiInterviewer.entity.vxEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@Data @Data
@TableName("help")
public class VxHelpEntity { public class VxHelpEntity {
private Integer id; private Integer id;

View File

@ -16,5 +16,4 @@ public class VxJobLike extends BaseEntity {
private Integer jobId; private Integer jobId;
@ApiModelProperty("用户id") @ApiModelProperty("用户id")
private Integer userId; private Integer userId;
} }

View File

@ -29,45 +29,52 @@ public interface ResumeService extends IService<Resume> {
*/ */
Integer writeResume(String name, String avatar,String sex, String status Integer writeResume(String name, String avatar,String sex, String status
, String graduateTime, String birthday, String phone, String email , String graduateTime, String birthday, String phone, String email
, String vx, String personalAdvantage, String other , String vx, String personalAdvantage, String other,String education
, List<Integer> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId); , String jobExpectation, String workExperience, String projectExperience, Integer userId);
/**
* 添加岗位期望
* @param expectationType
* @param position
* @param location
* @param salary
* @return
*/
Integer addJobExpectation(Integer expectationType, String position, String location, String salary,Integer userId);
/**
* 获取岗位期望列表
* @return
*/
List<JobExpectation> getJobExpectation(Integer userId);
/**
* 更新岗位期望
* @param expectationType
* @param position
* @param location
* @param salary
* @param userId
* @return
*/
Integer updateJobExpectation(Integer id,Integer expectationType, String position, String location, String salary, Integer userId);
/**
* 删除岗位期望
* @param id
* @return
*/
Integer deleteJobExpectation(Integer id);
Integer updateResume(Integer id, String name, String avatar,String sex, String status, Integer updateResume(Integer id, String name, String avatar,String sex, String status,
String graduateTime, String birthday, String phone, String email, String vx, String graduateTime, String birthday, String phone, String email, String vx,
String personalAdvantage, String other, List<Integer> jobExpectation, List<String> workExperience, String personalAdvantage, String other,String education,String jobExpectation, String workExperience,
List<String> projectExperience, Integer userId); String projectExperience, Integer userId);
Resume getResume(Integer userId);
// /**
// * 添加岗位期望
// * @param expectationType
// * @param position
// * @param location
// * @param salary
// * @return
// */
// Integer addJobExpectation(Integer expectationType, String position, String location, String salary,Integer userId);
//
// /**
// * 获取岗位期望列表
// * @return
// */
// List<JobExpectation> getJobExpectation(Integer userId);
//
// /**
// * 更新岗位期望
// * @param expectationType
// * @param position
// * @param location
// * @param salary
// * @param userId
// * @return
// */
// Integer updateJobExpectation(Integer id,Integer expectationType, String position, String location, String salary, Integer userId);
//
// /**
// * 删除岗位期望
// * @param id
// * @return
// */
// Integer deleteJobExpectation(Integer id);
} }

View File

@ -1,5 +1,6 @@
package com.yzdx.AiInterviewer.service.impl; package com.yzdx.AiInterviewer.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzdx.AiInterviewer.entity.JobExpectation; import com.yzdx.AiInterviewer.entity.JobExpectation;
@ -11,6 +12,10 @@ import com.yzdx.AiInterviewer.utiles.TimeUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.Period;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
@ -18,89 +23,135 @@ public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> impleme
@Autowired @Autowired
private ResumeMapper resumeMapper; private ResumeMapper resumeMapper;
@Autowired // @Autowired
private JobExpectationMapper jobExpectationMapper; // private JobExpectationMapper jobExpectationMapper;
@Override @Override
public Integer writeResume( String name, String avatar,String sex, String status, String graduateTime, String birthday, public Integer writeResume( String name, String avatar,String sex, String status, String graduateTime, String birthday,
String phone, String email, String vx, String personalAdvantage, String other, String phone, String email, String vx, String personalAdvantage, String other,String education,
List<Integer> jobExpectation, List<String> workExperience, List<String> projectExperience, String jobExpectation, String workExperience, String projectExperience,
Integer userId) { Integer userId) {
Resume resume=new Resume();
resume.setName(name);
resume.setAvatar(avatar);
resume.setSex(sex);
resume.setStatus(status);
resume.setGraduateTime(graduateTime);
resume.setBirthday(birthday);
resume.setPhone(phone);
resume.setEmail(email);
resume.setVx(vx);
resume.setPersonalAdvantage(personalAdvantage);
resume.setCreateTime(TimeUtil.getTime());
resume.setUpdateTime(TimeUtil.getTime());
resume.setOther(other);
resume.setUpdateUser(userId);
resume.setCreateUser(userId);
resume.setJobExpectation(jobExpectation.toString());
resume.setWorkExperience(workExperience.toString());
resume.setProjectExperience(projectExperience.toString());
Integer rows= resumeMapper.insert(resume);
return rows;
}
@Override LambdaQueryWrapper<Resume> queryWrapper=new LambdaQueryWrapper<>();
public Integer addJobExpectation(Integer expectationType, String position, String location, String salary, Integer userId) {
JobExpectation jobExpectation=new JobExpectation();
jobExpectation.setExpectationType(expectationType);
jobExpectation.setPosition(position);
jobExpectation.setSalary(salary);
jobExpectation.setCreateTime(TimeUtil.getTime());
jobExpectation.setUpdateTime(TimeUtil.getTime());
jobExpectation.setCreateUser(userId);
jobExpectation.setUpdateUser(userId);
Integer rows = jobExpectationMapper.insert(jobExpectation);
return rows;
}
@Override queryWrapper.eq(Resume::getUserId,userId);
public List<JobExpectation> getJobExpectation(Integer userId) {
LambdaQueryWrapper<JobExpectation> queryWrapper=new LambdaQueryWrapper<>();
queryWrapper.eq(JobExpectation::getUserId,userId);
List<JobExpectation> list = jobExpectationMapper.selectList(queryWrapper);
return list;
}
@Override Resume resume1 = resumeMapper.selectOne(queryWrapper);
public Integer updateJobExpectation(Integer id,Integer expectationType, String position, String location, String salary, Integer userId) {
JobExpectation jobExpectation=new JobExpectation();
jobExpectation.setId(id);
jobExpectation.setExpectationType(expectationType);
jobExpectation.setPosition(position);
jobExpectation.setSalary(salary);
jobExpectation.setCreateTime(TimeUtil.getTime());
jobExpectation.setUpdateTime(TimeUtil.getTime());
jobExpectation.setCreateUser(userId);
jobExpectation.setUpdateUser(userId);
Integer rows = jobExpectationMapper.updateById(jobExpectation);
return rows;
}
@Override if(resume1!=null){
public Integer deleteJobExpectation(Integer id) {
LambdaQueryWrapper<JobExpectation> queryWrapper=new LambdaQueryWrapper<>();
queryWrapper.eq(JobExpectation::getId,id);
if(jobExpectationMapper.selectOne(queryWrapper)==null){
return -2; return -2;
} }
Integer rows = jobExpectationMapper.delete(queryWrapper);
Resume resume=new Resume();
resume.setName(name);
resume.setAvatar(avatar);
resume.setSex(sex);
resume.setStatus(status);
resume.setGraduateTime(graduateTime);
// 获取当前日期
LocalDate currentDate = LocalDate.now();
// 解析生日日期
LocalDate birthDate = LocalDate.parse(birthday + "-01");
// 计算年龄
Period age = Period.between(birthDate, currentDate);
resume.setAge(age.getYears());
resume.setBirthday(birthday);
resume.setPhone(phone);
resume.setEmail(email);
resume.setVx(vx);
resume.setPersonalAdvantage(personalAdvantage);
resume.setCreateTime(TimeUtil.getTime());
resume.setUpdateTime(TimeUtil.getTime());
resume.setOther(other);
resume.setUpdateUser(userId);
resume.setCreateUser(userId);
resume.setUserId(userId);
resume.setJobExpectation(jobExpectation);
resume.setWorkExperience(workExperience);
resume.setProjectExperience(projectExperience);
resume.setEducationBackground(education);
Integer rows= resumeMapper.insert(resume);
return rows; return rows;
} }
// @Override
// public Integer addJobExpectation(Integer expectationType, String position, String location, String salary, Integer userId) {
// JobExpectation jobExpectation=new JobExpectation();
// jobExpectation.setExpectationType(expectationType);
// jobExpectation.setPosition(position);
// jobExpectation.setSalary(salary);
// jobExpectation.setCreateTime(TimeUtil.getTime());
// jobExpectation.setUpdateTime(TimeUtil.getTime());
// jobExpectation.setCreateUser(userId);
// jobExpectation.setUpdateUser(userId);
// Integer rows = jobExpectationMapper.insert(jobExpectation);
// return rows;
// }
// @Override
// public List<JobExpectation> getJobExpectation(Integer userId) {
// LambdaQueryWrapper<JobExpectation> queryWrapper=new LambdaQueryWrapper<>();
// queryWrapper.eq(JobExpectation::getUserId,userId);
// List<JobExpectation> list = jobExpectationMapper.selectList(queryWrapper);
// return list;
// }
// @Override
// public Integer updateJobExpectation(Integer id,Integer expectationType, String position, String location, String salary, Integer userId) {
// JobExpectation jobExpectation=new JobExpectation();
// jobExpectation.setId(id);
// jobExpectation.setExpectationType(expectationType);
// jobExpectation.setPosition(position);
// jobExpectation.setSalary(salary);
// jobExpectation.setCreateTime(TimeUtil.getTime());
// jobExpectation.setUpdateTime(TimeUtil.getTime());
// jobExpectation.setCreateUser(userId);
// jobExpectation.setUpdateUser(userId);
// Integer rows = jobExpectationMapper.updateById(jobExpectation);
// return rows;
// }
//
// @Override
// public Integer deleteJobExpectation(Integer id) {
// LambdaQueryWrapper<JobExpectation> queryWrapper=new LambdaQueryWrapper<>();
// queryWrapper.eq(JobExpectation::getId,id);
// if(jobExpectationMapper.selectOne(queryWrapper)==null){
// return -2;
// }
// Integer rows = jobExpectationMapper.delete(queryWrapper);
// return rows;
// }
@Override @Override
public Integer updateResume(Integer id, String name, String avatar,String sex, String status, public Integer updateResume(Integer id, String name, String avatar,String sex, String status,
String graduateTime, String birthday, String phone, String email, String vx, String graduateTime, String birthday, String phone, String email, String vx,
String personalAdvantage, String other, List<Integer> jobExpectation, List<String> workExperience, String personalAdvantage, String other,String education,String jobExpectation, String workExperience,
List<String> projectExperience, Integer userId) { String projectExperience, Integer userId) {
Resume resume=new Resume(); Resume resume=new Resume();
resume.setId(id); resume.setId(id);
resume.setName(name); resume.setName(name);
@ -113,15 +164,25 @@ public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> impleme
resume.setEmail(email); resume.setEmail(email);
resume.setVx(vx); resume.setVx(vx);
resume.setPersonalAdvantage(personalAdvantage); resume.setPersonalAdvantage(personalAdvantage);
resume.setCreateTime(TimeUtil.getTime());
resume.setUpdateTime(TimeUtil.getTime()); resume.setUpdateTime(TimeUtil.getTime());
resume.setOther(other); resume.setOther(other);
resume.setUpdateUser(userId); resume.setUpdateUser(userId);
resume.setCreateUser(userId); resume.setJobExpectation(jobExpectation);
resume.setJobExpectation(jobExpectation.toString()); resume.setWorkExperience(workExperience);
resume.setWorkExperience(workExperience.toString()); resume.setProjectExperience(projectExperience);
resume.setProjectExperience(projectExperience.toString());
Integer rows= resumeMapper.updateById(resume); Integer rows= resumeMapper.updateById(resume);
return rows; return rows;
} }
@Override
public Resume getResume(Integer userId) {
LambdaQueryWrapper<Resume> queryWrapper=new LambdaQueryWrapper<>();
queryWrapper.eq(Resume::getUserId,userId);
Resume resume = resumeMapper.selectOne(queryWrapper);
return resume;
}
} }