diff --git a/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java b/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java index 7113d40..2a0c121 100644 --- a/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java +++ b/src/main/java/com/yzdx/AiInterviewer/controller/VxController/VxInterviewController.java @@ -22,11 +22,10 @@ public class VxInterviewController { @PostMapping("addInterviewApplication") public R addInterviewApplication( @RequestParam(value = "jobId")Integer jobId, @RequestParam(value = "userId")Integer userId, - @RequestParam(value = "resumeId")Integer resumeId, @RequestParam(value = "postingId")Integer postingId, - @RequestParam(value = "companyEncoding")String companyEncoding, - @RequestParam(value = "status")Integer status){ - Integer rows=vxInterviewApplicationService.addInterviewApplication(jobId,userId,resumeId,postingId,companyEncoding,status); + @RequestParam(value = "companyEncoding")String companyEncoding + ){ + Integer rows=vxInterviewApplicationService.addInterviewApplication(jobId,userId,postingId,companyEncoding); if(rows==-2){ return R.error("申请失败"); } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java index ceaa0b4..2321953 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/VxService/VxInterviewApplicationService.java @@ -4,5 +4,5 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication; public interface VxInterviewApplicationService extends IService { - Integer addInterviewApplication(Integer jobId, Integer userId, Integer resumeId, Integer postingId, String companyEncoding, Integer status); + Integer addInterviewApplication(Integer jobId, Integer userId, Integer postingId, String companyEncoding); } diff --git a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java index ec3b54a..1e269b6 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/VxService/impl/VxInterviewApplicationServiceImpl.java @@ -2,7 +2,9 @@ package com.yzdx.AiInterviewer.service.VxService.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.yzdx.AiInterviewer.entity.Resume; import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewApplication; +import com.yzdx.AiInterviewer.mapper.ResumeMapper; import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewApplicationMapper; import com.yzdx.AiInterviewer.service.VxService.VxInterviewApplicationService; import com.yzdx.AiInterviewer.utiles.TimeUtil; @@ -13,8 +15,11 @@ import org.springframework.stereotype.Service; public class VxInterviewApplicationServiceImpl extends ServiceImpl implements VxInterviewApplicationService { @Autowired private VxInterviewApplicationMapper vxInterviewApplicationMapper; + @Autowired + private ResumeMapper resumeMapper; + @Override - public Integer addInterviewApplication(Integer jobId, Integer userId, Integer resumeId, Integer postingId, String companyEncoding, Integer status) { + public Integer addInterviewApplication(Integer jobId, Integer userId, Integer postingId, String companyEncoding) { LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(VxInterviewApplication::getJobId,jobId).eq(VxInterviewApplication::getPostingId,postingId); VxInterviewApplication vxInterviewApplication = vxInterviewApplicationMapper.selectOne(queryWrapper); @@ -26,8 +31,13 @@ public class VxInterviewApplicationServiceImpl extends ServiceImpl queryWrapper1=new LambdaQueryWrapper<>(); + + queryWrapper1.eq(Resume::getUserId,userId); + + Resume resume = resumeMapper.selectOne(queryWrapper1); + vxInterviewApplication1.setResumeId(resume.getId()); vxInterviewApplication1.setCreateTime(TimeUtil.getTime()); vxInterviewApplication1.setUpdateTime(TimeUtil.getTime()); vxInterviewApplication1.setCreateUser(userId); diff --git a/src/main/java/com/yzdx/AiInterviewer/service/impl/InvitePromoteServiceImpl.java b/src/main/java/com/yzdx/AiInterviewer/service/impl/InvitePromoteServiceImpl.java index 61cba74..a81dd72 100644 --- a/src/main/java/com/yzdx/AiInterviewer/service/impl/InvitePromoteServiceImpl.java +++ b/src/main/java/com/yzdx/AiInterviewer/service/impl/InvitePromoteServiceImpl.java @@ -139,7 +139,6 @@ public class InvitePromoteServiceImpl extends ServiceImpl