岗位申请业务逻辑
This commit is contained in:
@@ -443,11 +443,6 @@ public class HotakeCvInfoServiceImpl extends BaseServiceImpl implements IHotakeC
|
||||
return resultMsg;
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
String md5s = MD5.create().digestHex16("You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.");
|
||||
System.out.println(md5s);
|
||||
String md5s1 = MD5.create().digestHex16("You 1are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.");
|
||||
System.out.println(md5s1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,33 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.vetti.common.ai.gpt.ChatGPTClient;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.common.enums.MinioBucketNameEnum;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import com.vetti.common.utils.SecurityUtils;
|
||||
import com.vetti.common.utils.readFile.FileContentUtil;
|
||||
import com.vetti.hotake.domain.HotakeCvInfo;
|
||||
import com.vetti.hotake.domain.HotakeProblemBaseInfo;
|
||||
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
||||
import com.vetti.hotake.domain.dto.HotakeCvInfoDto;
|
||||
import com.vetti.hotake.domain.dto.VcDto.*;
|
||||
import com.vetti.hotake.domain.vo.HotakeInitScreQuestionsReplyRecordInfoVo;
|
||||
import com.vetti.hotake.mapper.HotakeCvInfoMapper;
|
||||
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
|
||||
import io.minio.GetObjectArgs;
|
||||
import io.minio.MinioClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -18,6 +42,7 @@ import com.vetti.hotake.service.IHotakeInitScreQuestionsReplyRecordInfoService;
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
@Slf4j
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServiceImpl implements IHotakeInitScreQuestionsReplyRecordInfoService
|
||||
@@ -25,6 +50,19 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
|
||||
@Autowired
|
||||
private HotakeInitScreQuestionsReplyRecordInfoMapper hotakeInitScreQuestionsReplyRecordInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private HotakeRolesApplyInfoMapper hotakeRolesApplyInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private HotakeCvInfoMapper hotakeCvInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private MinioClient minioClient;
|
||||
|
||||
@Autowired
|
||||
private ChatGPTClient chatGPTClient;
|
||||
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题回答记录信息
|
||||
*
|
||||
@@ -115,4 +153,242 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
|
||||
public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List<HotakeInitScreQuestionsReplyRecordInfo> hotakeInitScreQuestionsReplyRecordInfoList){
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.batchInsertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初步筛选问题回答记录信息批量保存
|
||||
* @param initScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息数据集合
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int saveHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfoVo initScreQuestionsReplyRecordInfoVo) {
|
||||
//先删除对应问题答案记录数据
|
||||
hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoByRoleApplyId(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
//批量保存数据
|
||||
if (CollectionUtil.isNotEmpty(initScreQuestionsReplyRecordInfoVo.getInitScreQuestionsReplyRecordInfoList())) {
|
||||
for (HotakeInitScreQuestionsReplyRecordInfo recordInfo : initScreQuestionsReplyRecordInfoVo.getInitScreQuestionsReplyRecordInfoList()) {
|
||||
recordInfo.setCandidateId(SecurityUtils.getUserId()).setRoleId(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
recordInfo.setRoleApplyId(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
fill(FillTypeEnum.INSERT.getCode(), recordInfo);
|
||||
}
|
||||
batchInsertHotakeInitScreQuestionsReplyRecordInfo(initScreQuestionsReplyRecordInfoVo.getInitScreQuestionsReplyRecordInfoList());
|
||||
}
|
||||
//获取申请的简历数据
|
||||
HotakeRolesApplyInfo applyInfo = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoById(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
if (applyInfo != null) {
|
||||
//查询候选人的当前最新简历信息
|
||||
HotakeCvInfo queryCv = new HotakeCvInfo();
|
||||
queryCv.setUserId(SecurityUtils.getUserId());
|
||||
queryCv.setCvFileType("cv");
|
||||
List<HotakeCvInfo> cvInfos = hotakeCvInfoMapper.selectHotakeCvInfoList(queryCv);
|
||||
HotakeCvInfo cvInfo = null;
|
||||
if(CollectionUtil.isNotEmpty(cvInfos)) {
|
||||
cvInfo = cvInfos.get(0);
|
||||
}
|
||||
//解析简历内容以及获取简历对应的评分数据
|
||||
log.info("开始处理简历");
|
||||
try {
|
||||
InputStream inputStream = minioClient.getObject(
|
||||
GetObjectArgs.builder()
|
||||
.bucket(MinioBucketNameEnum.CV.getCode())
|
||||
.object(applyInfo.getCvFile())
|
||||
.build());
|
||||
String contents = FileContentUtil.readFileContent(inputStream, applyInfo.getCvFileSuffix());
|
||||
log.info("简历信息:{}", contents);
|
||||
//验证文件内容是否改变,如果未改变不进行模型解析直接返回原有结果
|
||||
String md5Hash = MD5.create().digestHex16(contents);
|
||||
if (StrUtil.isNotEmpty(md5Hash) && cvInfo != null && md5Hash.equals(cvInfo.getCvMd5())) {
|
||||
//直接获取简历表中的简历解析的详细数据
|
||||
applyInfo.setCvScore(cvInfo.getCvScore());
|
||||
applyInfo.setCvTemplateJson(cvInfo.getCvTemplateJson());
|
||||
fill(FillTypeEnum.UPDATE.getCode(), applyInfo);
|
||||
applyInfo.setCvMd5(md5Hash);
|
||||
}else{
|
||||
//生成简历模版数据信息
|
||||
HotakeCvInfoDto cvInfoDto = handleAnalysisCvInfo(contents);
|
||||
//生成对应的简历评分
|
||||
String resultMsg = handleHotakeCvInfoScore(cvInfoDto);
|
||||
applyInfo.setCvScore(resultMsg);
|
||||
applyInfo.setCvTemplateJson(JSONUtil.toJsonStr(cvInfoDto));
|
||||
fill(FillTypeEnum.UPDATE.getCode(), cvInfo);
|
||||
applyInfo.setCvMd5(md5Hash);
|
||||
}
|
||||
//更新岗位申请数据记录
|
||||
applyInfo.setCandidateStatus("Pending");
|
||||
applyInfo.setStage("");
|
||||
hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(applyInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 简历解析数据
|
||||
*
|
||||
* @param contents
|
||||
* @return
|
||||
*/
|
||||
private HotakeCvInfoDto handleAnalysisCvInfo(String contents) {
|
||||
log.info("开始简历解析");
|
||||
try {
|
||||
List<Map<String,String>> list = new LinkedList();
|
||||
Map<String,String> entity = new HashMap<>();
|
||||
entity.put("role","user");
|
||||
entity.put("content","从下面提供的文本中提取所有能识别到的简历信息,只提取原文中存在的内容,不要补充、不推测、不总结。需要提取的字段包括:name(姓名或人名)、phone(电话号码)、email(电子邮件地址)、position(岗位或者简历中自己期望的职位等)、location(地点或者地址、家庭住址)、links(所有链接地址)、currentWork(当前工作公司)、about(关于我/自我介绍)、skills_tools(关键资格(许可证、注册/会员资格、认证))、languages(语言能力,主要就是Languages下面的语言)、experience(工作经历,除了title、company、location、durationStart、durationEnd,其他的都放到description里面,并且description里面要根据换行符分成不同的content),日期要拆分成开始时间(durationStart)和结束时间(durationEnd))、education(教育经历,日期要拆分成开始时间(durationStart)和结束时间(durationEnd))。请将提取结果以结构化 JSON 格式返回,格式如下:{ \\\"name\\\": \\\"\\\", \\\"phone\\\": \\\"\\\", \\\"currentWork\\\": \\\"\\\", \\\"position\\\": \\\"\\\", \\\"location\\\": \\\"\\\", \\\"email\\\": \\\"\\\", \\\"links\\\": [{\\\"content\\\":\\\"\\\"}], \\\"about\\\": \\\"\\\", \\\"skillsTools\\\": [{\\\"content\\\":\\\"\\\"}], \\\"languages\\\": [{\\\"content\\\":\\\"\\\"}], \\\"experience\\\": [{\\\"title\\\": \\\"\\\", \\\"company\\\": \\\"\\\",\\\"location\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\",\\\"description\\\": [{\\\"content\\\":\\\"\\\"}]}], \\\"education\\\": [{\\\"degree\\\": \\\"\\\",\\\"institution\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\"}] }。字段不存在则返回 null 或空数组。只返回标准可解析的 JSON结构 ,不要多余的```json等信息,不要解释说明,不要改写内容。以下为待处理文本:"+contents);
|
||||
//根据AI做
|
||||
list.add(entity);
|
||||
String resultCv = chatGPTClient.handleAiChat(JSONUtil.toJsonStr(list), "JX");
|
||||
log.info("开始返回简历解析结果:{}", resultCv);
|
||||
HotakeCvInfoDto cvInfoDto = JSONUtil.toBean(resultCv, HotakeCvInfoDto.class);
|
||||
//数据添加默认值
|
||||
if(cvInfoDto != null){
|
||||
if(StrUtil.isEmpty(cvInfoDto.getName())){
|
||||
cvInfoDto.setName("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getPhone())){
|
||||
cvInfoDto.setPhone("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getEmail())){
|
||||
cvInfoDto.setEmail("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getPosition())){
|
||||
cvInfoDto.setPosition("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getLocation())){
|
||||
cvInfoDto.setLocation("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getAbout())){
|
||||
cvInfoDto.setAbout("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(cvInfoDto.getCurrentWork())){
|
||||
cvInfoDto.setCurrentWork("-");
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(cvInfoDto.getSkillsTools())){
|
||||
for (VcSkillsToolsDto toolsDto :cvInfoDto.getSkillsTools()) {
|
||||
if(StrUtil.isEmpty(toolsDto.getContent())){
|
||||
toolsDto.setContent("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(cvInfoDto.getLinks())){
|
||||
for (VcLinksDto linksDto :cvInfoDto.getLinks()) {
|
||||
if(StrUtil.isEmpty(linksDto.getContent())){
|
||||
linksDto.setContent("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtil.isNotEmpty(cvInfoDto.getLanguages())){
|
||||
for (VcLanguagesDto languagesDto :cvInfoDto.getLanguages()) {
|
||||
if(StrUtil.isEmpty(languagesDto.getContent())){
|
||||
languagesDto.setContent("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtil.isNotEmpty(cvInfoDto.getExperience())){
|
||||
for (VcExperienceDto experienceDto :cvInfoDto.getExperience()) {
|
||||
if (StrUtil.isEmpty(experienceDto.getTitle())){
|
||||
experienceDto.setTitle("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getCompany())){
|
||||
experienceDto.setCompany("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getLocation())){
|
||||
experienceDto.setLocation("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getDurationStart())){
|
||||
experienceDto.setDurationStart("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getDurationEnd())){
|
||||
experienceDto.setDurationEnd("-");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(experienceDto.getDescription())){
|
||||
for(VcExperienceDescriptionDto descriptionDto :experienceDto.getDescription()){
|
||||
if(StrUtil.isEmpty(descriptionDto.getContent())){
|
||||
descriptionDto.setContent("-");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtil.isNotEmpty(cvInfoDto.getEducation())){
|
||||
for (VcEducationDto educationDto :cvInfoDto.getEducation()) {
|
||||
if (StrUtil.isEmpty(educationDto.getDegree())){
|
||||
educationDto.setDegree("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(educationDto.getInstitution())){
|
||||
educationDto.setInstitution("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(educationDto.getDurationStart())){
|
||||
educationDto.setDurationStart("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(educationDto.getDurationEnd())){
|
||||
educationDto.setDurationEnd("-");
|
||||
}
|
||||
if(educationDto.getCertificate() != null){
|
||||
if(StrUtil.isEmpty(educationDto.getCertificate().getFileName())){
|
||||
educationDto.getCertificate().setFileName("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSuffix())){
|
||||
educationDto.getCertificate().setFileSuffix("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(educationDto.getCertificate().getFileUrl())){
|
||||
educationDto.getCertificate().setFileUrl("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSizeShow())){
|
||||
educationDto.getCertificate().setFileSizeShow("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return cvInfoDto;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new HotakeCvInfoDto();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理简历信息
|
||||
*
|
||||
* @param hotakeCvInfo 简历信息
|
||||
* @return
|
||||
*/
|
||||
private String handleHotakeCvInfoScore(HotakeCvInfoDto cvInfoDto) {
|
||||
String resultMsg = "";
|
||||
try {
|
||||
//调用AI大模型
|
||||
List<Map<String, String>> list = new LinkedList();
|
||||
Map<String, String> mapEntity = new HashMap<>();
|
||||
mapEntity.put("role", "system");
|
||||
mapEntity.put("content", "You are a construction industry HR expert. Evaluate resumes and provide scores and recommendations for construction management positions.");
|
||||
list.add(mapEntity);
|
||||
Map<String, String> mapEntityOne = new HashMap<>();
|
||||
mapEntityOne.put("role", "user");
|
||||
mapEntityOne.put("content", "Position: Construction Labourer" +
|
||||
"\\nCandidate: " + cvInfoDto.getName() +
|
||||
"\\nResume Summary: " + JSONUtil.toJsonStr(cvInfoDto.getAbout()) +
|
||||
"\\nSkills: " + JSONUtil.toJsonStr(cvInfoDto.getSkillsTools()) +
|
||||
"\\nExperience: " + JSONUtil.toJsonStr(cvInfoDto.getExperience()) +
|
||||
"\\nEducation: " + JSONUtil.toJsonStr(cvInfoDto.getEducation()) +
|
||||
"\\nCertifications: " + JSONUtil.toJsonStr(cvInfoDto.getSkillsTools()));
|
||||
list.add(mapEntityOne);
|
||||
String promptText = JSONUtil.toJsonStr(list);
|
||||
resultMsg = chatGPTClient.handleAiChat(promptText, "CV");
|
||||
log.info("返回简历评分数据:{}", resultMsg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return resultMsg;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.common.utils.SecurityUtils;
|
||||
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
|
||||
import com.vetti.hotake.domain.dto.AnswerOptionsDto;
|
||||
import com.vetti.hotake.mapper.HotakeInitialScreeningQuestionsInfoMapper;
|
||||
@@ -69,7 +70,7 @@ public class HotakeInitialScreeningQuestionsInfoServiceImpl extends BaseServiceI
|
||||
@Override
|
||||
public int insertHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
|
||||
hotakeInitialScreeningQuestionsInfo.setRecruiterId(SecurityUtils.getUserId());
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeInitialScreeningQuestionsInfo);
|
||||
if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList()));
|
||||
@@ -89,6 +90,7 @@ public class HotakeInitialScreeningQuestionsInfoServiceImpl extends BaseServiceI
|
||||
@Override
|
||||
public int updateHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
hotakeInitialScreeningQuestionsInfo.setRecruiterId(SecurityUtils.getUserId());
|
||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeInitialScreeningQuestionsInfo);
|
||||
if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList()));
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import com.vetti.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
|
||||
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
||||
import com.vetti.hotake.service.IHotakeRolesApplyInfoService;
|
||||
|
||||
/**
|
||||
* 候选人岗位申请信息Service业务层处理
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-17
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements IHotakeRolesApplyInfoService
|
||||
{
|
||||
@Autowired
|
||||
private HotakeRolesApplyInfoMapper hotakeRolesApplyInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询候选人岗位申请信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 候选人岗位申请信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeRolesApplyInfo selectHotakeRolesApplyInfoById(Long id)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询候选人岗位申请信息列表
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 候选人岗位申请信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<HotakeRolesApplyInfo> selectHotakeRolesApplyInfoList(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoList(hotakeRolesApplyInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public HotakeRolesApplyInfo insertHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||
{
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeRolesApplyInfo);
|
||||
hotakeRolesApplyInfo.setCandidateId(SecurityUtils.getUserId());
|
||||
int resultNum = hotakeRolesApplyInfoMapper.insertHotakeRolesApplyInfo(hotakeRolesApplyInfo);
|
||||
return hotakeRolesApplyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public HotakeRolesApplyInfo updateHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||
{
|
||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeRolesApplyInfo);
|
||||
hotakeRolesApplyInfo.setCandidateId(SecurityUtils.getUserId());
|
||||
int resultNum = hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(hotakeRolesApplyInfo);
|
||||
return hotakeRolesApplyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除候选人岗位申请信息
|
||||
*
|
||||
* @param ids 需要删除的候选人岗位申请信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeRolesApplyInfoByIds(Long[] ids)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.deleteHotakeRolesApplyInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除候选人岗位申请信息信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeRolesApplyInfoById(Long id)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.deleteHotakeRolesApplyInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfoList 候选人岗位申请信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int batchInsertHotakeRolesApplyInfo(List<HotakeRolesApplyInfo> hotakeRolesApplyInfoList){
|
||||
return hotakeRolesApplyInfoMapper.batchInsertHotakeRolesApplyInfo(hotakeRolesApplyInfoList);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user