This commit is contained in:
parent
635a044411
commit
3791cc2a35
|
@ -0,0 +1,59 @@
|
||||||
|
package com.yzdx.AiInterviewer.controller;
|
||||||
|
|
||||||
|
import com.yzdx.AiInterviewer.comment.R;
|
||||||
|
import com.yzdx.AiInterviewer.service.QuestionService;
|
||||||
|
import com.yzdx.AiInterviewer.service.ResumeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/vx")
|
||||||
|
public class VxController {
|
||||||
|
@Autowired
|
||||||
|
private ResumeService resumeService;
|
||||||
|
@PostMapping("/write_resume")
|
||||||
|
public R writeResume(@RequestBody Map<String,Object> addResumeInfo){
|
||||||
|
Integer id =(Integer) addResumeInfo.get("id");
|
||||||
|
String name =(String) addResumeInfo.get("name");
|
||||||
|
String sex =(String) addResumeInfo.get("sex");
|
||||||
|
String status =(String) addResumeInfo.get("status");
|
||||||
|
String graduateTime =(String) addResumeInfo.get("graduateTime");
|
||||||
|
String birthday =(String) addResumeInfo.get("birthday");
|
||||||
|
String phone =(String) addResumeInfo.get("phone");
|
||||||
|
String email =(String) addResumeInfo.get("email");
|
||||||
|
String vx =(String) addResumeInfo.get("vx");
|
||||||
|
String personalAdvantage =(String) addResumeInfo.get("personalAdvantage");
|
||||||
|
String other =(String) addResumeInfo.get("other");
|
||||||
|
List<String> jobExpectation =(List<String>) addResumeInfo.get("jobExpectation");
|
||||||
|
List<String> workExperience =(List<String>) addResumeInfo.get("workExperience");
|
||||||
|
List<String> projectExperience =(List<String>) addResumeInfo.get("projectExperience");
|
||||||
|
Integer userId =(Integer) addResumeInfo.get("userId");
|
||||||
|
Integer rows = resumeService.writeResume(id, name, sex, status, graduateTime, birthday, phone, email, vx, personalAdvantage,
|
||||||
|
other,jobExpectation,workExperience,projectExperience,userId);
|
||||||
|
if(rows==0){
|
||||||
|
return R.error("提交失败,请重新输入");
|
||||||
|
}
|
||||||
|
return R.success("提交简历信息成功");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 添加岗位期望
|
||||||
|
* @param addResumeInfo
|
||||||
|
* @return R
|
||||||
|
*/
|
||||||
|
@PostMapping("/add_jobExpectation")
|
||||||
|
public R addJobExpectation(@RequestBody Map<String,Object> addResumeInfo){
|
||||||
|
Integer expectationType =(Integer) addResumeInfo.get("expectationType");
|
||||||
|
String position =(String) addResumeInfo.get("position");
|
||||||
|
String location =(String) addResumeInfo.get("location");
|
||||||
|
String salary =(String) addResumeInfo.get("salary");
|
||||||
|
Integer id =(Integer) addResumeInfo.get("id");
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("面试背景实体类")
|
@ApiModel("面试背景实体类")
|
||||||
@TableName("interview_background")
|
@TableName("interview_background")
|
||||||
public class BackgroundEntity extends BaseEntity{
|
public class BackgroundEntity extends BaseEntity<J> {
|
||||||
@ApiModelProperty("背景图片id")
|
@ApiModelProperty("背景图片id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class BaseEntity {
|
public class BaseEntity<J> {
|
||||||
@ApiModelProperty("创建时间")
|
@ApiModelProperty("创建时间")
|
||||||
private String createTime;
|
private String createTime;
|
||||||
@ApiModelProperty("更新时间")
|
@ApiModelProperty("更新时间")
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
package com.yzdx.AiInterviewer.entity;
|
package com.yzdx.AiInterviewer.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("公司主体类")
|
@ApiModel("公司主体类")
|
||||||
@TableName("company")
|
@TableName("company")
|
||||||
public class Company extends BaseEntity{
|
public class Company extends BaseEntity<J> {
|
||||||
@ApiModelProperty("公司id")
|
@ApiModelProperty("公司id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import lombok.Data;
|
||||||
@ApiModel("面试官形象实体类")
|
@ApiModel("面试官形象实体类")
|
||||||
@Data
|
@Data
|
||||||
@TableName("interview_images")
|
@TableName("interview_images")
|
||||||
public class ImagesEntity extends BaseEntity{
|
public class ImagesEntity extends BaseEntity<J> {
|
||||||
@ApiModelProperty("面试官形象id")
|
@ApiModelProperty("面试官形象id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
@TableName("interview_setting")
|
@TableName("interview_setting")
|
||||||
@ApiModel("面试设置实体类")
|
@ApiModel("面试设置实体类")
|
||||||
public class InterviewSetting extends BaseEntity{
|
public class InterviewSetting extends BaseEntity<J> {
|
||||||
@ApiModelProperty("面试设置id")
|
@ApiModelProperty("面试设置id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer Id;
|
private Integer Id;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("工作实体类")
|
@ApiModel("工作实体类")
|
||||||
@TableName("Job_list")
|
@TableName("Job_list")
|
||||||
public class JobEntity extends BaseEntity{
|
public class JobEntity extends BaseEntity<J> {
|
||||||
|
|
||||||
@ApiModelProperty("岗位id")
|
@ApiModelProperty("岗位id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.yzdx.AiInterviewer.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("岗位期望实体类")
|
||||||
|
@TableName("job_expectation")
|
||||||
|
public class JobExpectation extends BaseEntity{
|
||||||
|
@ApiModelProperty("岗位期望id")
|
||||||
|
private Integer id;
|
||||||
|
@ApiModelProperty("岗位类型")
|
||||||
|
private Integer expectationType;
|
||||||
|
@ApiModelProperty("期望职位")
|
||||||
|
private String position;
|
||||||
|
@ApiModelProperty("期望地点")
|
||||||
|
private String location;
|
||||||
|
@ApiModelProperty("期望薪资")
|
||||||
|
private String salary;
|
||||||
|
}
|
|
@ -9,7 +9,7 @@ import lombok.Data;
|
||||||
@ApiModel("logo实体类")
|
@ApiModel("logo实体类")
|
||||||
@Data
|
@Data
|
||||||
@TableName("interview_logo")
|
@TableName("interview_logo")
|
||||||
public class LogoEntity extends BaseEntity{
|
public class LogoEntity extends BaseEntity<J> {
|
||||||
@ApiModelProperty("公司logo id")
|
@ApiModelProperty("公司logo id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("题目实体类")
|
@ApiModel("题目实体类")
|
||||||
@TableName("question")
|
@TableName("question")
|
||||||
public class Question extends BaseEntity {
|
public class Question extends BaseEntity<J> {
|
||||||
@ApiModelProperty("题目id")
|
@ApiModelProperty("题目id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@ApiModel("题库实体类")
|
@ApiModel("题库实体类")
|
||||||
@Data
|
@Data
|
||||||
@TableName("question_bank")
|
@TableName("question_bank")
|
||||||
public class QuestionBank extends BaseEntity{
|
public class QuestionBank extends BaseEntity<J> {
|
||||||
@ApiModelProperty("题库id")
|
@ApiModelProperty("题库id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.yzdx.AiInterviewer.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("简历实体类")
|
||||||
|
@TableName("resume")
|
||||||
|
public class Resume {
|
||||||
|
@ApiModelProperty("简历id")
|
||||||
|
@TableId(type= IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
@ApiModelProperty("头像")
|
||||||
|
private String avatar;
|
||||||
|
@ApiModelProperty("名字")
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty("性别")
|
||||||
|
private String sex;
|
||||||
|
@ApiModelProperty("教育背景")
|
||||||
|
private String educationBackground;
|
||||||
|
@ApiModelProperty("身份")
|
||||||
|
private String status;
|
||||||
|
@ApiModelProperty("教育机构")
|
||||||
|
private String graduateInstitutions;
|
||||||
|
@ApiModelProperty("专业")
|
||||||
|
private String professional;
|
||||||
|
@ApiModelProperty("毕业时间")
|
||||||
|
private String graduateTime;
|
||||||
|
@ApiModelProperty("生日")
|
||||||
|
private String birthday;
|
||||||
|
@ApiModelProperty("手机号码")
|
||||||
|
private String phone;
|
||||||
|
@ApiModelProperty("邮箱")
|
||||||
|
private String email;
|
||||||
|
@ApiModelProperty("微信号")
|
||||||
|
private String vx;
|
||||||
|
@ApiModelProperty("个人优势")
|
||||||
|
private String personalAdvantage;
|
||||||
|
@ApiModelProperty("岗位期望")
|
||||||
|
private String jobExpectation;
|
||||||
|
@ApiModelProperty("工作经历")
|
||||||
|
private String workExperience;
|
||||||
|
@ApiModelProperty("项目经历")
|
||||||
|
private String projectExperience;
|
||||||
|
@ApiModelProperty("其它")
|
||||||
|
private String other;
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("投简历人的id")
|
||||||
|
private Integer userId;
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("分享题目实体类")
|
@ApiModel("分享题目实体类")
|
||||||
@TableName("sharedQuestion")
|
@TableName("sharedQuestion")
|
||||||
public class SharedQuestion extends BaseEntity {
|
public class SharedQuestion extends BaseEntity<J> {
|
||||||
@ApiModelProperty("题目id")
|
@ApiModelProperty("题目id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@ApiModel("分享题库实体类")
|
@ApiModel("分享题库实体类")
|
||||||
@Data
|
@Data
|
||||||
@TableName("sharedBank")
|
@TableName("sharedBank")
|
||||||
public class SharedQuestionBank extends BaseEntity{
|
public class SharedQuestionBank extends BaseEntity<J> {
|
||||||
@ApiModelProperty("题库id")
|
@ApiModelProperty("题库id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.Data;
|
||||||
@ApiModel("用户实体类")
|
@ApiModel("用户实体类")
|
||||||
@Data
|
@Data
|
||||||
@TableName("user")
|
@TableName("user")
|
||||||
public class User extends BaseEntity{
|
public class User extends BaseEntity<J> {
|
||||||
@ApiModelProperty("用户id")
|
@ApiModelProperty("用户id")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.yzdx.AiInterviewer.entity.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class JobDto extends BaseEntity {
|
public class JobDto extends BaseEntity<J> {
|
||||||
|
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.yzdx.AiInterviewer.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.yzdx.AiInterviewer.entity.BaseEntity;
|
||||||
|
import com.yzdx.AiInterviewer.entity.JobExpectation;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface JobExpectationMapper extends BaseMapper<JobExpectation> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.yzdx.AiInterviewer.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.yzdx.AiInterviewer.entity.Resume;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ResumeMapper extends BaseMapper<Resume> {
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.yzdx.AiInterviewer.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.yzdx.AiInterviewer.comment.R;
|
||||||
|
import com.yzdx.AiInterviewer.entity.Resume;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ResumeService extends IService<Resume> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Integer writeResume(Integer id, String name, String sex, String status
|
||||||
|
, String graduateTime, String birthday, String phone, String email
|
||||||
|
, String vx, String personalAdvantage, String other
|
||||||
|
, List<String> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId);
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.yzdx.AiInterviewer.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.yzdx.AiInterviewer.comment.R;
|
||||||
|
import com.yzdx.AiInterviewer.entity.Resume;
|
||||||
|
import com.yzdx.AiInterviewer.mapper.ResumeMapper;
|
||||||
|
import com.yzdx.AiInterviewer.service.ResumeService;
|
||||||
|
import com.yzdx.AiInterviewer.utiles.TimeUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ResumeServiceImpl extends ServiceImpl<ResumeMapper, Resume> implements ResumeService {
|
||||||
|
@Autowired
|
||||||
|
private ResumeService resumeService;
|
||||||
|
@Autowired
|
||||||
|
private ResumeMapper resumeMapper;
|
||||||
|
@Override
|
||||||
|
public Integer writeResume(Integer id, String name, String sex, String status, String graduateTime, String birthday, String phone, String email, String vx, String personalAdvantage, String other, List<String> jobExpectation, List<String> workExperience, List<String> projectExperience, Integer userId) {
|
||||||
|
Resume resume=new Resume();
|
||||||
|
resume.setId(id);
|
||||||
|
resume.setName(name);
|
||||||
|
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.setOther(other);
|
||||||
|
resume.setUserId(userId);
|
||||||
|
resume.setJobExpectation(jobExpectation.toString());
|
||||||
|
resume.setWorkExperience(workExperience.toString());
|
||||||
|
resume.setProjectExperience(projectExperience.toString());
|
||||||
|
Integer rows= resumeMapper.updateById(resume);
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
}
|
|
@ -165,7 +165,7 @@ public class SharedQuestionBankServiceImpl extends ServiceImpl<SharedQuestionBan
|
||||||
SharedQuestionBank sharedQuestionBank = sharedQuestionBankMapper.selectOne(queryWrapper);
|
SharedQuestionBank sharedQuestionBank = sharedQuestionBankMapper.selectOne(queryWrapper);
|
||||||
//根据分享题库的信息添加题库信息
|
//根据分享题库的信息添加题库信息
|
||||||
LambdaQueryWrapper<QuestionBank> queryWrapper1=new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<QuestionBank> queryWrapper1=new LambdaQueryWrapper<>();
|
||||||
queryWrapper1.eq(QuestionBank::getTypeName,sharedQuestionBank.getTypeName());
|
queryWrapper1.eq(QuestionBank::getTypeName,sharedQuestionBank.getTypeName()).eq(QuestionBank::getCompanyEncoding,encoding);
|
||||||
QuestionBank questionBank1 = questionBankMapper.selectOne(queryWrapper1);
|
QuestionBank questionBank1 = questionBankMapper.selectOne(queryWrapper1);
|
||||||
if (questionBank1!=null){
|
if (questionBank1!=null){
|
||||||
bankResult=bankResult+sharedQuestionBank.getTypeName();
|
bankResult=bankResult+sharedQuestionBank.getTypeName();
|
||||||
|
|
Loading…
Reference in New Issue