|
@@ -7,6 +7,8 @@ import com.ruoyi.web.work.api.util.AppUtil;
|
|
import com.ruoyi.web.work.domain.Position;
|
|
import com.ruoyi.web.work.domain.Position;
|
|
import com.ruoyi.web.work.domain.ResumeDeliver;
|
|
import com.ruoyi.web.work.domain.ResumeDeliver;
|
|
import com.ruoyi.web.work.domain.dto.ResumeDeliverDto;
|
|
import com.ruoyi.web.work.domain.dto.ResumeDeliverDto;
|
|
|
|
+import com.ruoyi.web.work.domain.vo.ReceiveListVo;
|
|
|
|
+import com.ruoyi.web.work.domain.vo.ReceiveVo;
|
|
import com.ruoyi.web.work.mapper.ResumeDeliverMapper;
|
|
import com.ruoyi.web.work.mapper.ResumeDeliverMapper;
|
|
import com.ruoyi.web.work.service.IPositionService;
|
|
import com.ruoyi.web.work.service.IPositionService;
|
|
import com.ruoyi.web.work.service.IResumeDeliverService;
|
|
import com.ruoyi.web.work.service.IResumeDeliverService;
|
|
@@ -38,7 +40,11 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
if (position == null || position.getState() != 0 || position.getAudit() != 1) {
|
|
if (position == null || position.getState() != 0 || position.getAudit() != 1) {
|
|
return AjaxResult.error("该职位不存在或已下架");
|
|
return AjaxResult.error("该职位不存在或已下架");
|
|
}
|
|
}
|
|
- ResumeDeliver resumeDeliver = new ResumeDeliver();
|
|
+ ResumeDeliver resumeDeliver = resumeDeliverMapper.check(position.getId(), AppUtil.getUser().getId());
|
|
|
|
+ if (resumeDeliver != null) {
|
|
|
|
+ return AjaxResult.error("请勿重复投递简历");
|
|
|
|
+ }
|
|
|
|
+ resumeDeliver = new ResumeDeliver();
|
|
resumeDeliver.setUserId(AppUtil.getUser().getId());
|
|
resumeDeliver.setUserId(AppUtil.getUser().getId());
|
|
resumeDeliver.setPositionId(position.getId());
|
|
resumeDeliver.setPositionId(position.getId());
|
|
resumeDeliver.setEnterpriseId(position.getUserId());
|
|
resumeDeliver.setEnterpriseId(position.getUserId());
|
|
@@ -86,4 +92,26 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
|
|
}
|
|
}
|
|
return AjaxResult.success(resumeDeliver);
|
|
return AjaxResult.success(resumeDeliver);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public AjaxResult remove(Long id) {
|
|
|
|
+ ResumeDeliver resumeDeliver = getById(id);
|
|
|
|
+ if (resumeDeliver == null || !resumeDeliver.getUserId().equals(AppUtil.getUser().getId())) {
|
|
|
|
+ return AjaxResult.error("简历不存在或非法操作");
|
|
|
|
+ }
|
|
|
|
+ if (!removeById(id)) {
|
|
|
|
+ throw new ServiceException("删除投递失败");
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<ReceiveVo> receive(Long userId) {
|
|
|
|
+ return resumeDeliverMapper.receive(userId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<ReceiveListVo> receiveList(ResumeDeliver resumeDeliver) {
|
|
|
|
+ return resumeDeliverMapper.receiveList(resumeDeliver);
|
|
|
|
+ }
|
|
}
|
|
}
|