修改bug:已经申请过的岗位,还可以继续申请,需要业务判断
This commit is contained in:
@@ -63,3 +63,6 @@ HotakeRolesInfoServiceImpl10001 = The job information is abnormal. Please try ag
|
|||||||
# manager.页面,字段 = User Manager
|
# manager.页面,字段 = User Manager
|
||||||
VerificationEmailTiTle = Your verification code
|
VerificationEmailTiTle = Your verification code
|
||||||
VerificationEmailContent = Your verification code is: {0}, valid for {1} minutes.
|
VerificationEmailContent = Your verification code is: {0}, valid for {1} minutes.
|
||||||
|
|
||||||
|
|
||||||
|
HotakeRolesApplyInfoServiceImpl10001 = You have already applied for this position
|
||||||
@@ -62,3 +62,4 @@ HotakeRolesInfoServiceImpl10001 = 岗位信息异常,请稍后再试
|
|||||||
VerificationEmailTiTle = 你的验证码
|
VerificationEmailTiTle = 你的验证码
|
||||||
VerificationEmailContent = 你的验证码是: {0},有效期为 {1} 分钟。
|
VerificationEmailContent = 你的验证码是: {0},有效期为 {1} 分钟。
|
||||||
|
|
||||||
|
HotakeRolesApplyInfoServiceImpl10001 = 您已申请该职位
|
||||||
@@ -48,4 +48,7 @@ public class HotakeRolesInfoDto extends HotakeRolesInfo {
|
|||||||
@ApiModelProperty("招聘人详细信息")
|
@ApiModelProperty("招聘人详细信息")
|
||||||
private SysUser recruiterUser;
|
private SysUser recruiterUser;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前用户是否已申请该岗位")
|
||||||
|
private Boolean hasApplied;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.vetti.hotake.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 候选人岗位申请信息Mapper接口
|
* 候选人岗位申请信息Mapper接口
|
||||||
@@ -82,4 +83,13 @@ public interface HotakeRolesApplyInfoMapper
|
|||||||
*/
|
*/
|
||||||
public int batchInsertHotakeRolesApplyInfo(List<HotakeRolesApplyInfo> hotakeRolesApplyInfoList);
|
public int batchInsertHotakeRolesApplyInfo(List<HotakeRolesApplyInfo> hotakeRolesApplyInfoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据候选人ID和岗位ID查询申请信息
|
||||||
|
*
|
||||||
|
* @param candidateId 候选人ID
|
||||||
|
* @param roleId 岗位ID
|
||||||
|
* @return 候选人岗位申请信息
|
||||||
|
*/
|
||||||
|
public HotakeRolesApplyInfo selectByCandidateIdAndRoleId(@Param("candidateId") Long candidateId, @Param("roleId") Long roleId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.vetti.common.core.service.BaseServiceImpl;
|
|||||||
import com.vetti.common.enums.FillTypeEnum;
|
import com.vetti.common.enums.FillTypeEnum;
|
||||||
import com.vetti.common.enums.StageEnum;
|
import com.vetti.common.enums.StageEnum;
|
||||||
import com.vetti.common.exception.ServiceException;
|
import com.vetti.common.exception.ServiceException;
|
||||||
|
import com.vetti.common.utils.MessageUtils;
|
||||||
import com.vetti.common.utils.SecurityUtils;
|
import com.vetti.common.utils.SecurityUtils;
|
||||||
import com.vetti.hotake.domain.*;
|
import com.vetti.hotake.domain.*;
|
||||||
import com.vetti.hotake.domain.dto.HotakeAiCvScoringRankingDto;
|
import com.vetti.hotake.domain.dto.HotakeAiCvScoringRankingDto;
|
||||||
@@ -172,7 +173,17 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
|
|||||||
public HotakeRolesApplyInfo insertHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
public HotakeRolesApplyInfo insertHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||||
{
|
{
|
||||||
fill(FillTypeEnum.INSERT.getCode(), hotakeRolesApplyInfo);
|
fill(FillTypeEnum.INSERT.getCode(), hotakeRolesApplyInfo);
|
||||||
hotakeRolesApplyInfo.setCandidateId(SecurityUtils.getUserId());
|
Long candidateId = SecurityUtils.getUserId();
|
||||||
|
hotakeRolesApplyInfo.setCandidateId(candidateId);
|
||||||
|
|
||||||
|
// 校验候选人和岗位的唯一性
|
||||||
|
if (hotakeRolesApplyInfo.getRoleId() != null) {
|
||||||
|
HotakeRolesApplyInfo existInfo = hotakeRolesApplyInfoMapper.selectByCandidateIdAndRoleId(candidateId, hotakeRolesApplyInfo.getRoleId());
|
||||||
|
if (existInfo != null) {
|
||||||
|
throw new ServiceException(MessageUtils.messageCustomize("HotakeRolesApplyInfoServiceImpl10001"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String fileSuffix = FileUtil.getSuffix(hotakeRolesApplyInfo.getCvFile());
|
String fileSuffix = FileUtil.getSuffix(hotakeRolesApplyInfo.getCvFile());
|
||||||
if (StrUtil.isNotEmpty(fileSuffix)) {
|
if (StrUtil.isNotEmpty(fileSuffix)) {
|
||||||
fileSuffix = fileSuffix.toLowerCase();
|
fileSuffix = fileSuffix.toLowerCase();
|
||||||
@@ -193,7 +204,17 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
|
|||||||
public HotakeRolesApplyInfo updateHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
public HotakeRolesApplyInfo updateHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||||
{
|
{
|
||||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeRolesApplyInfo);
|
fill(FillTypeEnum.UPDATE.getCode(), hotakeRolesApplyInfo);
|
||||||
hotakeRolesApplyInfo.setCandidateId(SecurityUtils.getUserId());
|
Long candidateId = SecurityUtils.getUserId();
|
||||||
|
hotakeRolesApplyInfo.setCandidateId(candidateId);
|
||||||
|
|
||||||
|
// 校验候选人和岗位的唯一性(排除自身)
|
||||||
|
if (hotakeRolesApplyInfo.getRoleId() != null && hotakeRolesApplyInfo.getId() != null) {
|
||||||
|
HotakeRolesApplyInfo existInfo = hotakeRolesApplyInfoMapper.selectByCandidateIdAndRoleId(candidateId, hotakeRolesApplyInfo.getRoleId());
|
||||||
|
if (existInfo != null && !existInfo.getId().equals(hotakeRolesApplyInfo.getId())) {
|
||||||
|
throw new ServiceException(MessageUtils.messageCustomize("HotakeRolesApplyInfoServiceImpl10001"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String fileSuffix = FileUtil.getSuffix(hotakeRolesApplyInfo.getCvFile());
|
String fileSuffix = FileUtil.getSuffix(hotakeRolesApplyInfo.getCvFile());
|
||||||
if (StrUtil.isNotEmpty(fileSuffix)) {
|
if (StrUtil.isNotEmpty(fileSuffix)) {
|
||||||
fileSuffix = fileSuffix.toLowerCase();
|
fileSuffix = fileSuffix.toLowerCase();
|
||||||
|
|||||||
@@ -134,6 +134,11 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
|
|||||||
|
|
||||||
SysUser user = sysUserMapper.selectUserById(hotakeRolesInfo.getRecruiterId());
|
SysUser user = sysUserMapper.selectUserById(hotakeRolesInfo.getRecruiterId());
|
||||||
dto.setRecruiterUser(user);
|
dto.setRecruiterUser(user);
|
||||||
|
|
||||||
|
// 判断当前用户是否已申请该岗位
|
||||||
|
Long currentUserId = SecurityUtils.getUserId();
|
||||||
|
HotakeRolesApplyInfo existApply = hotakeRolesApplyInfoMapper.selectByCandidateIdAndRoleId(currentUserId, id);
|
||||||
|
dto.setHasApplied(existApply != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dto;
|
return dto;
|
||||||
|
|||||||
@@ -305,4 +305,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
( #{item.id}, #{item.candidateId},#{item.recruiterId}, #{item.roleId}, #{item.fullName}, #{item.email}, #{item.phoneNumber}, #{item.cvFile}, #{item.coverLetter}, #{item.candidateStatus}, #{item.stage}, #{item.lastContact}, #{item.cvTemplateJson}, #{item.cvScore}, #{item.cvMd5}, #{item.experience}, #{item.aiMatchScore}, #{item.aiMatchScorePercentage}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
( #{item.id}, #{item.candidateId},#{item.recruiterId}, #{item.roleId}, #{item.fullName}, #{item.email}, #{item.phoneNumber}, #{item.cvFile}, #{item.coverLetter}, #{item.candidateStatus}, #{item.stage}, #{item.lastContact}, #{item.cvTemplateJson}, #{item.cvScore}, #{item.cvMd5}, #{item.experience}, #{item.aiMatchScore}, #{item.aiMatchScorePercentage}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectByCandidateIdAndRoleId" resultMap="HotakeRolesApplyInfoResult">
|
||||||
|
<include refid="selectHotakeRolesApplyInfoVo"/>
|
||||||
|
where candidate_id = #{candidateId} and role_id = #{roleId}
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user