This commit is contained in:
parent
f8ca479a7a
commit
375ee8cce5
|
@ -24,6 +24,8 @@ public class RecruitmentController {
|
|||
private InterviewSettingService interviewSettingService;
|
||||
@Autowired
|
||||
private CompanyService companyService;
|
||||
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "address",required = true),
|
||||
@ApiImplicitParam(name = "addressDetail",required = true),
|
||||
|
@ -132,17 +134,17 @@ public class RecruitmentController {
|
|||
Integer id=(Integer) updateInfo.get("id");
|
||||
List<String> address=(List<String>) updateInfo.get("address");
|
||||
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 userId=(Integer) updateInfo.get("userId");
|
||||
String details=(String) updateInfo.get("details");
|
||||
String jobName=(String) updateInfo.get("jobName");
|
||||
String startTime=(String) updateInfo.get("startTime");
|
||||
String endTime=(String) updateInfo.get("endTime");
|
||||
String min_salary=(String) updateInfo.get("min_salary");
|
||||
String max_salary=(String) updateInfo.get("max_salary");
|
||||
String min_number=(String) updateInfo.get("min_number");
|
||||
String max_number=(String) updateInfo.get("max_number");
|
||||
String min_salary=(String) updateInfo.get("minSalary");
|
||||
String max_salary=(String) updateInfo.get("maxSalary");
|
||||
String min_number=(String) updateInfo.get("minNumber");
|
||||
String max_number=(String) updateInfo.get("maxNumber");
|
||||
List<String> jobTips=(List<String>) updateInfo.get("jobTips");
|
||||
Integer requirement=(Integer) updateInfo.get("requirement");
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.yzdx.AiInterviewer.controller.VxController;
|
|||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.entity.JobExpectation;
|
||||
import com.yzdx.AiInterviewer.entity.Resume;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity;
|
||||
import com.yzdx.AiInterviewer.service.ResumeService;
|
||||
|
@ -26,13 +27,11 @@ import java.util.List;
|
|||
public class VxUserController {
|
||||
@Autowired
|
||||
private ResumeService resumeService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@Autowired
|
||||
private VxCompanyLikeService vxCompanyLikeService;
|
||||
|
||||
@Autowired
|
||||
private VxHelpService vxHelpService;
|
||||
|
||||
|
||||
|
@ -40,7 +39,6 @@ public class VxUserController {
|
|||
@ApiImplicitParam(name = "js_code", required = true)
|
||||
}
|
||||
)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "求职者登陆(vx)",notes = "")
|
||||
@PostMapping("/WxLogin")
|
||||
public R<String> R (@RequestParam(value = "js_code", required = true) String js_code) throws Exception {
|
||||
|
@ -93,7 +91,6 @@ public class VxUserController {
|
|||
/**
|
||||
*填写简历
|
||||
*/
|
||||
@ResponseBody
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name",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 = "personalAdvantage") String personalAdvantage,
|
||||
@RequestParam(required = true, value = "other") String other,
|
||||
@RequestParam(required = true, value = "jobExpectation") List<Integer> jobExpectation,
|
||||
@RequestParam(required = true, value = "workExperience") List<String> workExperience,
|
||||
@RequestParam(required = true, value = "projectExperience") List<String> projectExperience,
|
||||
@RequestParam(required = true, value = "education_background") String education_background,
|
||||
@RequestParam(required = true, value = "jobExpectation") String jobExpectation,
|
||||
@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 = "sex") String sex){
|
||||
Integer rows = resumeService.writeResume( name, avatar,sex, status, graduateTime, birthday, phone, email, vx, personalAdvantage,
|
||||
other,jobExpectation,workExperience,projectExperience,userId);
|
||||
Integer rows = resumeService.writeResume( name, avatar,sex, status, graduateTime, birthday, phone,
|
||||
email, vx, personalAdvantage,
|
||||
other,education_background,jobExpectation,workExperience,projectExperience,userId);
|
||||
if(rows!=1){
|
||||
return R.error("提交失败,请重新输入");
|
||||
}
|
||||
return R.success("提交简历信息成功");
|
||||
}
|
||||
|
||||
/**
|
||||
*更新简历
|
||||
*/
|
||||
|
@ -155,7 +153,6 @@ public class VxUserController {
|
|||
@ApiImplicitParam(name = "sex",required = true),
|
||||
})
|
||||
|
||||
|
||||
@PostMapping("/update_resume")
|
||||
public R updateResume(@RequestParam(required = true, value = "name") String name,
|
||||
@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 = "personalAdvantage") String personalAdvantage,
|
||||
@RequestParam(required = true, value = "other") String other,
|
||||
@RequestParam(required = true, value = "jobExpectation") List<Integer> jobExpectation,
|
||||
@RequestParam(required = true, value = "workExperience") List<String> workExperience,
|
||||
@RequestParam(required = true, value = "projectExperience") List<String> projectExperience,
|
||||
@RequestParam(required = true, value = "education_background") String education_background,
|
||||
@RequestParam(required = true, value = "jobExpectation") String jobExpectation,
|
||||
@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 = "sex") String sex){
|
||||
@RequestParam(required = true, value = "sex") String sex
|
||||
){
|
||||
Integer rows = resumeService.updateResume(id,name,avatar, sex, status, graduateTime,
|
||||
birthday, phone, email, vx, personalAdvantage,
|
||||
other,jobExpectation,workExperience,projectExperience,userId);
|
||||
other,education_background,jobExpectation,workExperience,projectExperience,userId);
|
||||
if(rows!=1){
|
||||
return R.error("提交失败,请重新输入");
|
||||
}
|
||||
return R.success("提交简历信息成功");
|
||||
}
|
||||
@GetMapping("/getResume")
|
||||
public R getResume(Integer userId){
|
||||
|
||||
Resume resume= resumeService.getResume(userId);
|
||||
|
||||
return R.success(resume);
|
||||
}
|
||||
/**
|
||||
* 获取简历列表
|
||||
* */
|
||||
/**
|
||||
* 添加岗位期望
|
||||
*/
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "expectationType",required = true),
|
||||
@ApiImplicitParam(name = "position",required = true),
|
||||
@ApiImplicitParam(name = "location",required = true),
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
@ApiImplicitParam(name = "salary",required = true),
|
||||
})
|
||||
@PostMapping("/add_jobExpectation")
|
||||
public R addJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
|
||||
@RequestParam(required = true, value = "position") String position,
|
||||
@RequestParam(required = true, value = "location") String location,
|
||||
@RequestParam(required = true, value = "salary") String salary,
|
||||
@RequestParam(required = true, value = "userId") Integer userId)
|
||||
{
|
||||
Integer rows= resumeService.addJobExpectation(expectationType,position,location,salary,userId);
|
||||
if(rows!=1){
|
||||
return R.error("保存失败,请重新输入");
|
||||
}
|
||||
return R.success("保存岗位期望成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位期望列表
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GetMapping("/getJobExpectation")
|
||||
public R getJobExpectation(@ApiParam("Integer userId") Integer userId){
|
||||
List<JobExpectation> list= resumeService.getJobExpectation(userId);
|
||||
return R.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新岗位期望信息
|
||||
*/
|
||||
@ResponseBody
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "expectationType",required = true),
|
||||
@ApiImplicitParam(name = "position",required = true),
|
||||
@ApiImplicitParam(name = "location",required = true),
|
||||
@ApiImplicitParam(name = "userId",required = true),
|
||||
@ApiImplicitParam(name = "salary",required = true),
|
||||
})
|
||||
@PostMapping("/updateJobExpectation")
|
||||
public R updateJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
|
||||
@RequestParam(required = true, value = "position") String position,
|
||||
@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "location") String location,
|
||||
@RequestParam(required = true, value = "salary") String salary,
|
||||
@RequestParam(required = true, value = "userId") Integer userId){
|
||||
Integer rows= resumeService.updateJobExpectation(id,expectationType,position,location,salary,userId);
|
||||
if(rows!=1){
|
||||
return R.error("保存失败,请重新输入");
|
||||
}
|
||||
return R.success("保存岗位期望成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位期望
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/deleteJobExpectation")
|
||||
public R deleteJobExpectation(Integer id){
|
||||
Integer rows= resumeService.deleteJobExpectation(id);
|
||||
if(rows==-2){
|
||||
return R.error("删除失败");
|
||||
}
|
||||
return R.success("删除成功");
|
||||
}
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "expectationType",required = true),
|
||||
// @ApiImplicitParam(name = "position",required = true),
|
||||
// @ApiImplicitParam(name = "location",required = true),
|
||||
// @ApiImplicitParam(name = "userId",required = true),
|
||||
// @ApiImplicitParam(name = "salary",required = true),
|
||||
// })
|
||||
// @PostMapping("/add_jobExpectation")
|
||||
// public R addJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
|
||||
// @RequestParam(required = true, value = "position") String position,
|
||||
// @RequestParam(required = true, value = "location") String location,
|
||||
// @RequestParam(required = true, value = "salary") String minSalary,
|
||||
// @RequestParam(required = true, value = "salary") String maxSalary,
|
||||
// @RequestParam(required = true, value = "userId") Integer userId) {
|
||||
// String salary=minSalary+maxSalary;
|
||||
// Integer rows= resumeService.addJobExpectation(expectationType,position,location,salary,userId);
|
||||
// if(rows!=1){
|
||||
// return R.error("保存失败,请重新输入");
|
||||
// }
|
||||
// return R.success("保存岗位期望成功");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取岗位期望列表
|
||||
// * @return
|
||||
// */
|
||||
//
|
||||
// @GetMapping("/getJobExpectation")
|
||||
// public R getJobExpectation(@ApiParam("Integer userId") Integer userId){
|
||||
// List<JobExpectation> list= resumeService.getJobExpectation(userId);
|
||||
// return R.success(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 更新岗位期望信息
|
||||
// */
|
||||
// @ResponseBody
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "expectationType",required = true),
|
||||
// @ApiImplicitParam(name = "position",required = true),
|
||||
// @ApiImplicitParam(name = "location",required = true),
|
||||
// @ApiImplicitParam(name = "userId",required = true),
|
||||
// @ApiImplicitParam(name = "salary",required = true),
|
||||
// })
|
||||
// @PostMapping("/updateJobExpectation")
|
||||
// public R updateJobExpectation(@RequestParam(required = true, value = "expectationType") Integer expectationType,
|
||||
// @RequestParam(required = true, value = "position") String position,
|
||||
// @RequestParam(required = true, value = "id") Integer id,
|
||||
// @RequestParam(required = true, value = "location") String location,
|
||||
// @RequestParam(required = true, value = "salary") String salary,
|
||||
// @RequestParam(required = true, value = "userId") Integer userId){
|
||||
// Integer rows= resumeService.updateJobExpectation(id,expectationType,position,location,salary,userId);
|
||||
// if(rows!=1){
|
||||
// return R.error("保存失败,请重新输入");
|
||||
// }
|
||||
// return R.success("保存岗位期望成功");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除岗位期望
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @DeleteMapping("/deleteJobExpectation")
|
||||
// public R deleteJobExpectation(Integer id){
|
||||
// Integer rows= resumeService.deleteJobExpectation(id);
|
||||
// if(rows==-2){
|
||||
// return R.error("删除失败");
|
||||
// }
|
||||
// return R.success("删除成功");
|
||||
// }
|
||||
|
||||
|
||||
@GetMapping("/getHelpList")
|
||||
|
@ -277,9 +287,7 @@ public class VxUserController {
|
|||
@RequestParam(required = true, value = "encoding") String encoding,
|
||||
@RequestParam(required = true, value = "password") String password){
|
||||
|
||||
|
||||
return userService.adminLogin(phone, encoding, password);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,9 +18,13 @@ public class Resume extends BaseEntity{
|
|||
private String avatar;
|
||||
@ApiModelProperty("名字")
|
||||
private String name;
|
||||
@ApiModelProperty("年龄")
|
||||
private Integer Age;
|
||||
@ApiModelProperty("性别")
|
||||
private String sex;
|
||||
@ApiModelProperty("教育背景")
|
||||
@ApiModelProperty("学历")
|
||||
private String education;
|
||||
@ApiModelProperty("教育经历")
|
||||
private String educationBackground;
|
||||
@ApiModelProperty("身份")
|
||||
private String status;
|
||||
|
@ -48,8 +52,6 @@ public class Resume extends BaseEntity{
|
|||
private String projectExperience;
|
||||
@ApiModelProperty("其它")
|
||||
private String other;
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createTime;
|
||||
@ApiModelProperty("投简历人的id")
|
||||
private Integer userId;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -1,8 +1,10 @@
|
|||
package com.yzdx.AiInterviewer.entity.vxEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("help")
|
||||
public class VxHelpEntity {
|
||||
|
||||
private Integer id;
|
||||
|
|
|
@ -16,5 +16,4 @@ public class VxJobLike extends BaseEntity {
|
|||
private Integer jobId;
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
|
|
|
@ -29,45 +29,52 @@ public interface ResumeService extends IService<Resume> {
|
|||
*/
|
||||
Integer writeResume(String name, String avatar,String sex, String status
|
||||
, String graduateTime, String birthday, String phone, String email
|
||||
, String vx, String personalAdvantage, String other
|
||||
, List<Integer> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId);
|
||||
, String vx, String personalAdvantage, String other,String education
|
||||
, 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,
|
||||
String graduateTime, String birthday, String phone, String email, String vx,
|
||||
String personalAdvantage, String other, List<Integer> jobExpectation, List<String> workExperience,
|
||||
List<String> projectExperience, Integer userId);
|
||||
String personalAdvantage, String other,String education,String jobExpectation, String workExperience,
|
||||
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);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.yzdx.AiInterviewer.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
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.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
@ -18,89 +23,135 @@ public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> impleme
|
|||
|
||||
@Autowired
|
||||
private ResumeMapper resumeMapper;
|
||||
@Autowired
|
||||
private JobExpectationMapper jobExpectationMapper;
|
||||
// @Autowired
|
||||
// private JobExpectationMapper jobExpectationMapper;
|
||||
@Override
|
||||
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,
|
||||
List<Integer> jobExpectation, List<String> workExperience, List<String> projectExperience,
|
||||
String phone, String email, String vx, String personalAdvantage, String other,String education,
|
||||
String jobExpectation, String workExperience, String projectExperience,
|
||||
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
|
||||
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;
|
||||
}
|
||||
LambdaQueryWrapper<Resume> queryWrapper=new LambdaQueryWrapper<>();
|
||||
|
||||
@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;
|
||||
}
|
||||
queryWrapper.eq(Resume::getUserId,userId);
|
||||
|
||||
@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;
|
||||
}
|
||||
Resume resume1 = resumeMapper.selectOne(queryWrapper);
|
||||
|
||||
@Override
|
||||
public Integer deleteJobExpectation(Integer id) {
|
||||
LambdaQueryWrapper<JobExpectation> queryWrapper=new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(JobExpectation::getId,id);
|
||||
if(jobExpectationMapper.selectOne(queryWrapper)==null){
|
||||
if(resume1!=null){
|
||||
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;
|
||||
}
|
||||
|
||||
// @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
|
||||
public Integer updateResume(Integer id, String name, String avatar,String sex, String status,
|
||||
String graduateTime, String birthday, String phone, String email, String vx,
|
||||
String personalAdvantage, String other, List<Integer> jobExpectation, List<String> workExperience,
|
||||
List<String> projectExperience, Integer userId) {
|
||||
String personalAdvantage, String other,String education,String jobExpectation, String workExperience,
|
||||
String projectExperience, Integer userId) {
|
||||
Resume resume=new Resume();
|
||||
resume.setId(id);
|
||||
resume.setName(name);
|
||||
|
@ -113,15 +164,25 @@ public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> impleme
|
|||
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());
|
||||
resume.setJobExpectation(jobExpectation);
|
||||
resume.setWorkExperience(workExperience);
|
||||
resume.setProjectExperience(projectExperience);
|
||||
Integer rows= resumeMapper.updateById(resume);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue