简历读取基础逻辑添加以及用户语音配置信息字段添加
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.vetti.hotake.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.vetti.common.annotation.Excel;
|
||||
import com.vetti.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 面试者问题库信息对象 hotake_problem_base_info
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeProblemBaseInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 问题 */
|
||||
@ApiModelProperty("问题")
|
||||
@Excel(name = "问题")
|
||||
private String contents;
|
||||
|
||||
/** 状态(0 禁用,1 启用) */
|
||||
@ApiModelProperty("状态(0 禁用,1 启用)")
|
||||
@Excel(name = "状态", readConverterExp = "0=,禁=用,1,启=用")
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.vetti.hotake.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeProblemBaseInfo;
|
||||
|
||||
/**
|
||||
* 面试者问题库信息Mapper接口
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
public interface HotakeProblemBaseInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询面试者问题库信息
|
||||
*
|
||||
* @param id 面试者问题库信息主键
|
||||
* @return 面试者问题库信息
|
||||
*/
|
||||
public HotakeProblemBaseInfo selectHotakeProblemBaseInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询面试者问题库信息列表
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 面试者问题库信息集合
|
||||
*/
|
||||
public List<HotakeProblemBaseInfo> selectHotakeProblemBaseInfoList(HotakeProblemBaseInfo hotakeProblemBaseInfo);
|
||||
|
||||
/**
|
||||
* 新增面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHotakeProblemBaseInfo(HotakeProblemBaseInfo hotakeProblemBaseInfo);
|
||||
|
||||
/**
|
||||
* 修改面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHotakeProblemBaseInfo(HotakeProblemBaseInfo hotakeProblemBaseInfo);
|
||||
|
||||
/**
|
||||
* 删除面试者问题库信息
|
||||
*
|
||||
* @param id 面试者问题库信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeProblemBaseInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除面试者问题库信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeProblemBaseInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfoList 面试者问题库信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertHotakeProblemBaseInfo(List<HotakeProblemBaseInfo> hotakeProblemBaseInfoList);
|
||||
|
||||
}
|
||||
@@ -35,6 +35,15 @@ public interface IHotakeCvInfoService
|
||||
*/
|
||||
public HotakeCvInfo insertHotakeCvInfo(HotakeCvInfo hotakeCvInfo);
|
||||
|
||||
/**
|
||||
* 处理简历信息
|
||||
*
|
||||
* @param hotakeCvInfo 简历信息
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeCvInfo handleHotakeCvInfo(HotakeCvInfo hotakeCvInfo);
|
||||
|
||||
|
||||
/**
|
||||
* 修改简历信息
|
||||
*
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeProblemBaseInfo;
|
||||
|
||||
/**
|
||||
* 面试者问题库信息Service接口
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
public interface IHotakeProblemBaseInfoService
|
||||
{
|
||||
/**
|
||||
* 查询面试者问题库信息
|
||||
*
|
||||
* @param id 面试者问题库信息主键
|
||||
* @return 面试者问题库信息
|
||||
*/
|
||||
public HotakeProblemBaseInfo selectHotakeProblemBaseInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询面试者问题库信息列表
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 面试者问题库信息集合
|
||||
*/
|
||||
public List<HotakeProblemBaseInfo> selectHotakeProblemBaseInfoList(HotakeProblemBaseInfo hotakeProblemBaseInfo);
|
||||
|
||||
/**
|
||||
* 新增面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHotakeProblemBaseInfo(HotakeProblemBaseInfo hotakeProblemBaseInfo);
|
||||
|
||||
/**
|
||||
* 修改面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHotakeProblemBaseInfo(HotakeProblemBaseInfo hotakeProblemBaseInfo);
|
||||
|
||||
/**
|
||||
* 批量删除面试者问题库信息
|
||||
*
|
||||
* @param ids 需要删除的面试者问题库信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeProblemBaseInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除面试者问题库信息信息
|
||||
*
|
||||
* @param id 面试者问题库信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeProblemBaseInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfoList 面试者问题库信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertHotakeProblemBaseInfo(List<HotakeProblemBaseInfo> hotakeProblemBaseInfoList);
|
||||
|
||||
}
|
||||
@@ -1,9 +1,17 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import com.vetti.common.utils.readFile.FileContentUtil;
|
||||
import com.vetti.common.utils.readText.ResumeTextExtractor;
|
||||
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 +26,7 @@ import com.vetti.hotake.service.IHotakeCvInfoService;
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-02
|
||||
*/
|
||||
@Slf4j
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeCvInfoServiceImpl extends BaseServiceImpl implements IHotakeCvInfoService
|
||||
@@ -61,11 +70,34 @@ public class HotakeCvInfoServiceImpl extends BaseServiceImpl implements IHotakeC
|
||||
@Override
|
||||
public HotakeCvInfo insertHotakeCvInfo(HotakeCvInfo hotakeCvInfo)
|
||||
{
|
||||
hotakeCvInfo.setCreateTime(DateUtils.getNowDate());
|
||||
fill(FillTypeEnum.INSERT.getCode(),hotakeCvInfo);
|
||||
hotakeCvInfoMapper.insertHotakeCvInfo(hotakeCvInfo);
|
||||
//对简历数据进行处理生成相应的题库数据
|
||||
// handleHotakeCvInfo(hotakeCvInfo);
|
||||
return hotakeCvInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理简历信息
|
||||
* @param hotakeCvInfo 简历信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public HotakeCvInfo handleHotakeCvInfo(HotakeCvInfo hotakeCvInfo) {
|
||||
try{
|
||||
InputStream inputStream = new FileInputStream("/Users/wangxiangshun/Desktop/管报数据/223/Abrar Mohammed Project Manager Resume.docx");
|
||||
String contents = FileContentUtil.readFileContent(inputStream,hotakeCvInfo.getCvFileType());
|
||||
//进行简历数据提取
|
||||
ResumeTextExtractor extractor = new ResumeTextExtractor();
|
||||
extractor.extractResumeData(contents,"");
|
||||
log.info("返回简历基本内容:{}", JSONUtil.toJsonStr(extractor.extractResumeData(contents,"")));
|
||||
}catch (Exception e) {
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改简历信息
|
||||
*
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.vetti.hotake.mapper.HotakeProblemBaseInfoMapper;
|
||||
import com.vetti.hotake.domain.HotakeProblemBaseInfo;
|
||||
import com.vetti.hotake.service.IHotakeProblemBaseInfoService;
|
||||
|
||||
/**
|
||||
* 面试者问题库信息Service业务层处理
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-11-04
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeProblemBaseInfoServiceImpl extends BaseServiceImpl implements IHotakeProblemBaseInfoService
|
||||
{
|
||||
@Autowired
|
||||
private HotakeProblemBaseInfoMapper hotakeProblemBaseInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询面试者问题库信息
|
||||
*
|
||||
* @param id 面试者问题库信息主键
|
||||
* @return 面试者问题库信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeProblemBaseInfo selectHotakeProblemBaseInfoById(Long id)
|
||||
{
|
||||
return hotakeProblemBaseInfoMapper.selectHotakeProblemBaseInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询面试者问题库信息列表
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 面试者问题库信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<HotakeProblemBaseInfo> selectHotakeProblemBaseInfoList(HotakeProblemBaseInfo hotakeProblemBaseInfo)
|
||||
{
|
||||
return hotakeProblemBaseInfoMapper.selectHotakeProblemBaseInfoList(hotakeProblemBaseInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int insertHotakeProblemBaseInfo(HotakeProblemBaseInfo hotakeProblemBaseInfo)
|
||||
{
|
||||
hotakeProblemBaseInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return hotakeProblemBaseInfoMapper.insertHotakeProblemBaseInfo(hotakeProblemBaseInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfo 面试者问题库信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int updateHotakeProblemBaseInfo(HotakeProblemBaseInfo hotakeProblemBaseInfo)
|
||||
{
|
||||
hotakeProblemBaseInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return hotakeProblemBaseInfoMapper.updateHotakeProblemBaseInfo(hotakeProblemBaseInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除面试者问题库信息
|
||||
*
|
||||
* @param ids 需要删除的面试者问题库信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeProblemBaseInfoByIds(Long[] ids)
|
||||
{
|
||||
return hotakeProblemBaseInfoMapper.deleteHotakeProblemBaseInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除面试者问题库信息信息
|
||||
*
|
||||
* @param id 面试者问题库信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeProblemBaseInfoById(Long id)
|
||||
{
|
||||
return hotakeProblemBaseInfoMapper.deleteHotakeProblemBaseInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增面试者问题库信息
|
||||
*
|
||||
* @param hotakeProblemBaseInfoList 面试者问题库信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int batchInsertHotakeProblemBaseInfo(List<HotakeProblemBaseInfo> hotakeProblemBaseInfoList){
|
||||
return hotakeProblemBaseInfoMapper.batchInsertHotakeProblemBaseInfo(hotakeProblemBaseInfoList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.vetti.hotake.mapper.HotakeProblemBaseInfoMapper">
|
||||
|
||||
<resultMap type="HotakeProblemBaseInfo" id="HotakeProblemBaseInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="contents" column="contents" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHotakeProblemBaseInfoVo">
|
||||
select id, user_id, contents, status, del_flag, create_by, create_time, update_by, update_time, remark from hotake_problem_base_info
|
||||
</sql>
|
||||
|
||||
<select id="selectHotakeProblemBaseInfoList" parameterType="HotakeProblemBaseInfo" resultMap="HotakeProblemBaseInfoResult">
|
||||
<include refid="selectHotakeProblemBaseInfoVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="contents != null and contents != ''"> and contents = #{contents}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHotakeProblemBaseInfoById" parameterType="Long" resultMap="HotakeProblemBaseInfoResult">
|
||||
<include refid="selectHotakeProblemBaseInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHotakeProblemBaseInfo" parameterType="HotakeProblemBaseInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into hotake_problem_base_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="contents != null">contents,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="contents != null">#{contents},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHotakeProblemBaseInfo" parameterType="HotakeProblemBaseInfo">
|
||||
update hotake_problem_base_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="contents != null">contents = #{contents},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHotakeProblemBaseInfoById" parameterType="Long">
|
||||
delete from hotake_problem_base_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHotakeProblemBaseInfoByIds" parameterType="String">
|
||||
delete from hotake_problem_base_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertHotakeProblemBaseInfo">
|
||||
insert into hotake_problem_base_info( id, user_id, contents, status, del_flag, create_by, create_time, update_by, update_time, remark) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.userId}, #{item.contents}, #{item.status}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user