岗位- AI问题业务逻辑完善

This commit is contained in:
2025-12-14 15:42:14 +08:00
parent 37766b1a05
commit e18371ddb8
15 changed files with 730 additions and 8 deletions

View File

@@ -0,0 +1,96 @@
package com.vetti.web.controller.hotake;
import com.vetti.common.annotation.Log;
import com.vetti.common.core.controller.BaseController;
import com.vetti.common.core.domain.R;
import com.vetti.common.core.page.TableWebDataInfo;
import com.vetti.common.enums.BusinessType;
import com.vetti.hotake.domain.HotakeAiInterviewQuestionsInfo;
import com.vetti.hotake.service.IHotakeAiInterviewQuestionsInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* AI面试问题信息Controller
*
* @author wangxiangshun
* @date 2025-12-14
*/
@Api(tags ="AI面试问题信息")
@RestController
@RequestMapping("/hotake/aiInterviewQuestionsInfo")
public class HotakeAiInterviewQuestionsInfoController extends BaseController
{
@Autowired
private IHotakeAiInterviewQuestionsInfoService hotakeAiInterviewQuestionsInfoService;
/**
* 查询AI面试问题信息列表
*/
@ApiOperation("查询AI面试问题信息列表")
@GetMapping("/getPageList")
public TableWebDataInfo<HotakeAiInterviewQuestionsInfo> pageList(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo)
{
startPage();
List<HotakeAiInterviewQuestionsInfo> list = hotakeAiInterviewQuestionsInfoService.selectHotakeAiInterviewQuestionsInfoList(hotakeAiInterviewQuestionsInfo);
return getWebDataTable(list);
}
/**
* 查询AI面试问题信息列表(无分页)
*/
@ApiOperation("查询AI面试问题信息列表(无分页)")
@GetMapping("/getList")
public R<List<HotakeAiInterviewQuestionsInfo>> list(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo)
{
List<HotakeAiInterviewQuestionsInfo> list = hotakeAiInterviewQuestionsInfoService.selectHotakeAiInterviewQuestionsInfoList(hotakeAiInterviewQuestionsInfo);
return R.ok(list);
}
/**
* 获取AI面试问题信息详细信息
*/
@ApiOperation("获取AI面试问题信息详细信息")
@GetMapping(value = "/{id}")
public R<HotakeAiInterviewQuestionsInfo> getInfo(@PathVariable("id") Long id)
{
return R.ok(hotakeAiInterviewQuestionsInfoService.selectHotakeAiInterviewQuestionsInfoById(id));
}
/**
* 新增AI面试问题信息
*/
@ApiOperation("新增AI面试问题信息")
@Log(title = "AI面试问题信息", businessType = BusinessType.INSERT)
@PostMapping
public R<?> add(@RequestBody HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo)
{
return R.ok(hotakeAiInterviewQuestionsInfoService.insertHotakeAiInterviewQuestionsInfo(hotakeAiInterviewQuestionsInfo));
}
/**
* 修改AI面试问题信息
*/
@ApiOperation("修改AI面试问题信息")
@Log(title = "AI面试问题信息", businessType = BusinessType.UPDATE)
@PutMapping
public R<?> edit(@RequestBody HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo)
{
return R.ok(hotakeAiInterviewQuestionsInfoService.updateHotakeAiInterviewQuestionsInfo(hotakeAiInterviewQuestionsInfo));
}
/**
* 删除AI面试问题信息
*/
@ApiOperation("删除AI面试问题信息")
@Log(title = "AI面试问题信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R<?> remove(@PathVariable Long[] ids)
{
return R.ok(hotakeAiInterviewQuestionsInfoService.deleteHotakeAiInterviewQuestionsInfoByIds(ids));
}
}

View File

@@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletResponse;
import com.vetti.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@@ -77,12 +78,13 @@ public class SysDictDataController extends BaseController
/**
* 根据字典类型查询字典数据信息
*/
@ApiOperation("根据字典类型查询字典数据信息(hotake_languages_type:语言类型,hotake_skills_tool_type:技能工具类型," +
"role_level:岗位级别,role_location_type:岗位地点类型,role_select_job_type:岗位选择工作类型,role_type:岗位类型," +
"role_required_skills:所需技能,role_nice_to_have_skills:加分技能,role_education_requirements_type:教育要求类型," +
"role_certification_licenses:岗位所需证书,role_benefits:岗位福利,role_publishing_channels:发布渠道)")
@ApiOperation("根据字典类型查询字典数据信息")
@GetMapping(value = "/type/{dictType}")
public R<List<SysDictData>> dictType(@PathVariable String dictType)
public R<List<SysDictData>> dictType(@ApiParam("(hotake_languages_type:语言类型,hotake_skills_tool_type:技能工具类型," +
" role_level:岗位级别,role_location_type:岗位地点类型,role_select_job_type:岗位选择工作类型,role_type:岗位类型," +
" role_required_skills:所需技能,role_nice_to_have_skills:加分技能,role_education_requirements_type:教育要求类型," +
" role_certification_licenses:岗位所需证书,role_benefits:岗位福利,role_publishing_channels:发布渠道," +
"role_initial_screening_questions_type:初始化筛选问题类型,role_recruiter_voice_avatar:招聘AI语音和虚拟形象)") @PathVariable String dictType)
{
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
if (StringUtils.isNull(data))

View File

@@ -67,6 +67,16 @@ public class SysDictData extends BaseEntity
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
@ApiModelProperty("数据类型")
private String dataType;
@ApiModelProperty("附件地址")
private String fileUrl;
@ApiModelProperty("头像地址")
private String avatarUrl;
@ApiModelProperty("字典子类集合")
private List<SysDictData> childrenDictData;
@@ -189,6 +199,30 @@ public class SysDictData extends BaseEntity
this.childrenDictData = childrenDictData;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
public String getAvatarUrl() {
return avatarUrl;
}
public void setAvatarUrl(String avatarUrl) {
this.avatarUrl = avatarUrl;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@@ -0,0 +1,68 @@
package com.vetti.hotake.domain;
import com.vetti.hotake.domain.dto.AiQuestionDto;
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;
import java.math.BigDecimal;
import java.util.List;
/**
* AI面试问题信息对象 hotake_ai_interview_questions_info
*
* @author wangxiangshun
* @date 2025-12-14
*/
@Data
@Accessors(chain = true)
public class HotakeAiInterviewQuestionsInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
@ApiModelProperty("主键ID")
private Long id;
/** 岗位ID */
@ApiModelProperty("岗位ID")
@Excel(name = "岗位ID")
private Long roleId;
/** 招聘人ID */
@ApiModelProperty("招聘人ID")
@Excel(name = "招聘人ID")
private Long recruiterId;
/** 问题 */
@ApiModelProperty("问题")
@Excel(name = "问题")
private String questionTitle;
/** 概述 */
@ApiModelProperty("概述")
@Excel(name = "概述")
private String overview;
/** 焦点类型 */
@ApiModelProperty("焦点类型")
@Excel(name = "焦点类型")
private String focusType;
/** 问题明细记录json */
@ApiModelProperty("问题明细记录json")
@Excel(name = "问题明细记录json")
private String questionJson;
@ApiModelProperty("问题数量")
private Integer questionNum;
@ApiModelProperty("所需时间(分钟.min)")
private String times;
@ApiModelProperty("AI问题数据集合")
private List<AiQuestionDto> aiQuestionList;
}

View File

@@ -155,6 +155,15 @@ public class HotakeRolesInfo extends BaseEntity
@ApiModelProperty("语言")
private String languages;
@ApiModelProperty("AI筛选音频标识")
private String aiScreeningVideoFlag;
@ApiModelProperty("语音ID")
private String videoId;
@ApiModelProperty("语速")
private String speechSpeed;
@ApiModelProperty("数据类型release:发布Jobdraft:草稿,template:模版)")
private String dataType;

View File

@@ -0,0 +1,19 @@
package com.vetti.hotake.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* AI面试问题对象
*
* @author wangxiangshun
* @date 2025-11-30
*/
@Data
@Accessors(chain = true)
public class AiQuestionDto {
@ApiModelProperty("问题")
private String questions;
}

View File

@@ -1,5 +1,6 @@
package com.vetti.hotake.domain.dto;
import com.vetti.hotake.domain.HotakeAiInterviewQuestionsInfo;
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
import com.vetti.hotake.domain.HotakeRolesInfo;
import com.vetti.hotake.domain.dto.roleDto.*;
@@ -40,4 +41,7 @@ public class HotakeRolesInfoDto extends HotakeRolesInfo {
@ApiModelProperty("初步筛选问题数据集合")
private List<HotakeInitialScreeningQuestionsInfo> initialScreeningQuestionsInfoList;
@ApiModelProperty("AI面试问题数据集合")
private List<HotakeAiInterviewQuestionsInfo> aiInterviewQuestionsInfoList;
}

View File

@@ -0,0 +1,69 @@
package com.vetti.hotake.mapper;
import java.util.List;
import com.vetti.hotake.domain.HotakeAiInterviewQuestionsInfo;
/**
* AI面试问题信息Mapper接口
*
* @author wangxiangshun
* @date 2025-12-14
*/
public interface HotakeAiInterviewQuestionsInfoMapper
{
/**
* 查询AI面试问题信息
*
* @param id AI面试问题信息主键
* @return AI面试问题信息
*/
public HotakeAiInterviewQuestionsInfo selectHotakeAiInterviewQuestionsInfoById(Long id);
/**
* 查询AI面试问题信息列表
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return AI面试问题信息集合
*/
public List<HotakeAiInterviewQuestionsInfo> selectHotakeAiInterviewQuestionsInfoList(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo);
/**
* 新增AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return 结果
*/
public int insertHotakeAiInterviewQuestionsInfo(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo);
/**
* 修改AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return 结果
*/
public int updateHotakeAiInterviewQuestionsInfo(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo);
/**
* 删除AI面试问题信息
*
* @param id AI面试问题信息主键
* @return 结果
*/
public int deleteHotakeAiInterviewQuestionsInfoById(Long id);
/**
* 批量删除AI面试问题信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteHotakeAiInterviewQuestionsInfoByIds(Long[] ids);
/**
* 批量新增AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfoList AI面试问题信息列表
* @return 结果
*/
public int batchInsertHotakeAiInterviewQuestionsInfo(List<HotakeAiInterviewQuestionsInfo> hotakeAiInterviewQuestionsInfoList);
}

View File

@@ -0,0 +1,70 @@
package com.vetti.hotake.service;
import java.util.List;
import com.vetti.hotake.domain.HotakeAiInterviewQuestionsInfo;
/**
* AI面试问题信息Service接口
*
* @author wangxiangshun
* @date 2025-12-14
*/
public interface IHotakeAiInterviewQuestionsInfoService
{
/**
* 查询AI面试问题信息
*
* @param id AI面试问题信息主键
* @return AI面试问题信息
*/
public HotakeAiInterviewQuestionsInfo selectHotakeAiInterviewQuestionsInfoById(Long id);
/**
* 查询AI面试问题信息列表
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return AI面试问题信息集合
*/
public List<HotakeAiInterviewQuestionsInfo> selectHotakeAiInterviewQuestionsInfoList(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo);
/**
* 新增AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return 结果
*/
public int insertHotakeAiInterviewQuestionsInfo(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo);
/**
* 修改AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return 结果
*/
public int updateHotakeAiInterviewQuestionsInfo(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo);
/**
* 批量删除AI面试问题信息
*
* @param ids 需要删除的AI面试问题信息主键集合
* @return 结果
*/
public int deleteHotakeAiInterviewQuestionsInfoByIds(Long[] ids);
/**
* 删除AI面试问题信息信息
*
* @param id AI面试问题信息主键
* @return 结果
*/
public int deleteHotakeAiInterviewQuestionsInfoById(Long id);
/**
* 批量新增AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfoList AI面试问题信息列表
* @return 结果
*/
public int batchInsertHotakeAiInterviewQuestionsInfo(List<HotakeAiInterviewQuestionsInfo> hotakeAiInterviewQuestionsInfoList);
}

View File

@@ -0,0 +1,161 @@
package com.vetti.hotake.service.impl;
import cn.hutool.core.collection.CollectionUtil;
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.hotake.domain.HotakeAiInterviewQuestionsInfo;
import com.vetti.hotake.domain.dto.AiQuestionDto;
import com.vetti.hotake.mapper.HotakeAiInterviewQuestionsInfoMapper;
import com.vetti.hotake.service.IHotakeAiInterviewQuestionsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* AI面试问题信息Service业务层处理
*
* @author wangxiangshun
* @date 2025-12-14
*/
@SuppressWarnings("all")
@Service
public class HotakeAiInterviewQuestionsInfoServiceImpl extends BaseServiceImpl implements IHotakeAiInterviewQuestionsInfoService
{
@Autowired
private HotakeAiInterviewQuestionsInfoMapper hotakeAiInterviewQuestionsInfoMapper;
/**
* 查询AI面试问题信息
*
* @param id AI面试问题信息主键
* @return AI面试问题信息
*/
@Transactional(readOnly = true)
@Override
public HotakeAiInterviewQuestionsInfo selectHotakeAiInterviewQuestionsInfoById(Long id)
{
HotakeAiInterviewQuestionsInfo questionsInfo = hotakeAiInterviewQuestionsInfoMapper.selectHotakeAiInterviewQuestionsInfoById(id);
if(questionsInfo != null){
Integer questionNum = 0;
String times = "0";
if(StrUtil.isNotEmpty(questionsInfo.getQuestionJson())){
List<AiQuestionDto> aiQuestionList = JSONUtil.toList(questionsInfo.getQuestionJson(), AiQuestionDto.class);
questionsInfo.setAiQuestionList(aiQuestionList);
questionNum = aiQuestionList.size();
times = String.valueOf(aiQuestionList.size() * 1.5);
}
questionsInfo.setQuestionNum(questionNum);
questionsInfo.setTimes(times);
}
return questionsInfo;
}
/**
* 查询AI面试问题信息列表
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return AI面试问题信息
*/
@Transactional(readOnly = true)
@Override
public List<HotakeAiInterviewQuestionsInfo> selectHotakeAiInterviewQuestionsInfoList(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo)
{
List<HotakeAiInterviewQuestionsInfo> questionsInfoList = hotakeAiInterviewQuestionsInfoMapper.selectHotakeAiInterviewQuestionsInfoList(hotakeAiInterviewQuestionsInfo);
if(CollectionUtil.isNotEmpty(questionsInfoList)){
for (HotakeAiInterviewQuestionsInfo questionsInfo : questionsInfoList) {
if(questionsInfo != null){
Integer questionNum = 0;
String times = "0";
if(StrUtil.isNotEmpty(questionsInfo.getQuestionJson())){
List<AiQuestionDto> aiQuestionList = JSONUtil.toList(questionsInfo.getQuestionJson(), AiQuestionDto.class);
questionsInfo.setAiQuestionList(aiQuestionList);
questionNum = aiQuestionList.size();
times = String.valueOf(aiQuestionList.size() * 1.5);
}
questionsInfo.setQuestionNum(questionNum);
questionsInfo.setTimes(times);
}
}
}
return questionsInfoList;
}
/**
* 新增AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Override
public int insertHotakeAiInterviewQuestionsInfo(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo)
{
fill(FillTypeEnum.INSERT.getCode(), hotakeAiInterviewQuestionsInfo);
if(CollectionUtil.isNotEmpty(hotakeAiInterviewQuestionsInfo.getAiQuestionList())){
hotakeAiInterviewQuestionsInfo.setQuestionJson(JSONUtil.toJsonStr(hotakeAiInterviewQuestionsInfo.getAiQuestionList()));
}else{
hotakeAiInterviewQuestionsInfo.setQuestionJson("");
}
return hotakeAiInterviewQuestionsInfoMapper.insertHotakeAiInterviewQuestionsInfo(hotakeAiInterviewQuestionsInfo);
}
/**
* 修改AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfo AI面试问题信息
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Override
public int updateHotakeAiInterviewQuestionsInfo(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo)
{
fill(FillTypeEnum.UPDATE.getCode(), hotakeAiInterviewQuestionsInfo);
if(CollectionUtil.isNotEmpty(hotakeAiInterviewQuestionsInfo.getAiQuestionList())){
hotakeAiInterviewQuestionsInfo.setQuestionJson(JSONUtil.toJsonStr(hotakeAiInterviewQuestionsInfo.getAiQuestionList()));
}else{
hotakeAiInterviewQuestionsInfo.setQuestionJson("");
}
return hotakeAiInterviewQuestionsInfoMapper.updateHotakeAiInterviewQuestionsInfo(hotakeAiInterviewQuestionsInfo);
}
/**
* 批量删除AI面试问题信息
*
* @param ids 需要删除的AI面试问题信息主键
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Override
public int deleteHotakeAiInterviewQuestionsInfoByIds(Long[] ids)
{
return hotakeAiInterviewQuestionsInfoMapper.deleteHotakeAiInterviewQuestionsInfoByIds(ids);
}
/**
* 删除AI面试问题信息信息
*
* @param id AI面试问题信息主键
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Override
public int deleteHotakeAiInterviewQuestionsInfoById(Long id)
{
return hotakeAiInterviewQuestionsInfoMapper.deleteHotakeAiInterviewQuestionsInfoById(id);
}
/**
* 批量新增AI面试问题信息
*
* @param hotakeAiInterviewQuestionsInfoList AI面试问题信息列表
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Override
public int batchInsertHotakeAiInterviewQuestionsInfo(List<HotakeAiInterviewQuestionsInfo> hotakeAiInterviewQuestionsInfoList){
return hotakeAiInterviewQuestionsInfoMapper.batchInsertHotakeAiInterviewQuestionsInfo(hotakeAiInterviewQuestionsInfoList);
}
}

View File

@@ -13,17 +13,21 @@ import com.vetti.common.utils.DateUtils;
import com.vetti.common.utils.MessageUtils;
import com.vetti.common.utils.SecurityUtils;
import com.vetti.common.utils.uuid.IdUtils;
import com.vetti.hotake.domain.HotakeAiInterviewQuestionsInfo;
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
import com.vetti.hotake.domain.HotakeRolesInfo;
import com.vetti.hotake.domain.dto.AiQuestionDto;
import com.vetti.hotake.domain.dto.HotakeRolesInfoDto;
import com.vetti.hotake.domain.dto.roleDto.*;
import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
import com.vetti.hotake.service.IHotakeAiInterviewQuestionsInfoService;
import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService;
import com.vetti.hotake.service.IHotakeRolesInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
@@ -42,6 +46,9 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
@Autowired
private IHotakeInitialScreeningQuestionsInfoService hotakeInitialScreeningQuestionsInfoService;
@Autowired
private IHotakeAiInterviewQuestionsInfoService hotakeAiInterviewQuestionsInfoService;
/**
* 查询岗位信息
*
@@ -106,6 +113,11 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
queryQuestion.setRoleId(id);
List<HotakeInitialScreeningQuestionsInfo> questionsInfoList = hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoList(queryQuestion);
dto.setInitialScreeningQuestionsInfoList(questionsInfoList);
HotakeAiInterviewQuestionsInfo queryAiQuestion = new HotakeAiInterviewQuestionsInfo();
queryAiQuestion.setRoleId(id);
List<HotakeAiInterviewQuestionsInfo> aiInterviewQuestionsInfoList = hotakeAiInterviewQuestionsInfoService.selectHotakeAiInterviewQuestionsInfoList(queryAiQuestion);
dto.setAiInterviewQuestionsInfoList(aiInterviewQuestionsInfoList);
}
return dto;
@@ -273,6 +285,8 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
}else{
rolesInfo.setRoleBenefitsJson("");
}
//todo 暂时加在这里,完成第3步的时候,初始化第5步的内容
createAiQuestion(rolesInfoId);
}
if(RoleOperStepsEnum.STEPS_4.getCode().equals(hotakeRolesInfo.getOperStep())){
@@ -306,4 +320,26 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
HotakeRolesInfoDto rolesInfoDto = selectHotakeRolesInfoDtoById(rolesInfo.getId());
return rolesInfoDto;
}
/**
* 初始化AI面试问题-临时的
* @param roleId 岗位ID
*/
private void createAiQuestion(Long roleId){
HotakeAiInterviewQuestionsInfo questionsInfo = new HotakeAiInterviewQuestionsInfo();
questionsInfo.setQuestionTitle("General Questions");
questionsInfo.setFocusType("Personality & Culture");
questionsInfo.setRoleId(roleId);
questionsInfo.setRecruiterId(SecurityUtils.getUserId());
questionsInfo.setOverview("This is General Questions Overview");
List<AiQuestionDto> questionDtoList = new ArrayList<>();
AiQuestionDto questionDto = new AiQuestionDto();
questionDto.setQuestions("Can you provide an example of a situation where you had to work in a physically demanding environment?,How do you plan to handle tasks that require specific construction knowledge or skills that you may not have yet?");
questionDtoList.add(questionDto);
questionsInfo.setAiQuestionList(questionDtoList);
hotakeAiInterviewQuestionsInfoService.insertHotakeAiInterviewQuestionsInfo(questionsInfo);
}
}

View File

@@ -0,0 +1,112 @@
<?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.HotakeAiInterviewQuestionsInfoMapper">
<resultMap type="HotakeAiInterviewQuestionsInfo" id="HotakeAiInterviewQuestionsInfoResult">
<result property="id" column="id" />
<result property="roleId" column="role_id" />
<result property="recruiterId" column="recruiter_id" />
<result property="questionTitle" column="question_title" />
<result property="overview" column="overview" />
<result property="focusType" column="focus_type" />
<result property="questionJson" column="question_json" />
<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="selectHotakeAiInterviewQuestionsInfoVo">
select id, role_id, recruiter_id, question_title, overview, focus_type, question_json, del_flag, create_by, create_time, update_by, update_time, remark from hotake_ai_interview_questions_info
</sql>
<select id="selectHotakeAiInterviewQuestionsInfoList" parameterType="HotakeAiInterviewQuestionsInfo" resultMap="HotakeAiInterviewQuestionsInfoResult">
<include refid="selectHotakeAiInterviewQuestionsInfoVo"/>
<where>
<if test="roleId != null "> and role_id = #{roleId}</if>
<if test="recruiterId != null "> and recruiter_id = #{recruiterId}</if>
<if test="questionTitle != null and questionTitle != ''"> and question_title = #{questionTitle}</if>
<if test="overview != null and overview != ''"> and overview = #{overview}</if>
<if test="focusType != null and focusType != ''"> and focus_type = #{focusType}</if>
<if test="questionJson != null and questionJson != ''"> and question_json = #{questionJson}</if>
</where>
</select>
<select id="selectHotakeAiInterviewQuestionsInfoById" parameterType="Long" resultMap="HotakeAiInterviewQuestionsInfoResult">
<include refid="selectHotakeAiInterviewQuestionsInfoVo"/>
where id = #{id}
</select>
<insert id="insertHotakeAiInterviewQuestionsInfo" parameterType="HotakeAiInterviewQuestionsInfo" useGeneratedKeys="true" keyProperty="id">
insert into hotake_ai_interview_questions_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="roleId != null">role_id,</if>
<if test="recruiterId != null">recruiter_id,</if>
<if test="questionTitle != null">question_title,</if>
<if test="overview != null">overview,</if>
<if test="focusType != null">focus_type,</if>
<if test="questionJson != null">question_json,</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="roleId != null">#{roleId},</if>
<if test="recruiterId != null">#{recruiterId},</if>
<if test="questionTitle != null">#{questionTitle},</if>
<if test="overview != null">#{overview},</if>
<if test="focusType != null">#{focusType},</if>
<if test="questionJson != null">#{questionJson},</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="updateHotakeAiInterviewQuestionsInfo" parameterType="HotakeAiInterviewQuestionsInfo">
update hotake_ai_interview_questions_info
<trim prefix="SET" suffixOverrides=",">
<if test="roleId != null">role_id = #{roleId},</if>
<if test="recruiterId != null">recruiter_id = #{recruiterId},</if>
<if test="questionTitle != null">question_title = #{questionTitle},</if>
<if test="overview != null">overview = #{overview},</if>
<if test="focusType != null">focus_type = #{focusType},</if>
<if test="questionJson != null">question_json = #{questionJson},</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="deleteHotakeAiInterviewQuestionsInfoById" parameterType="Long">
delete from hotake_ai_interview_questions_info where id = #{id}
</delete>
<delete id="deleteHotakeAiInterviewQuestionsInfoByIds" parameterType="String">
delete from hotake_ai_interview_questions_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchInsertHotakeAiInterviewQuestionsInfo">
insert into hotake_ai_interview_questions_info( id, role_id, recruiter_id, question_title, overview, focus_type, question_json, del_flag, create_by, create_time, update_by, update_time, remark,) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.roleId}, #{item.recruiterId}, #{item.questionTitle}, #{item.overview}, #{item.focusType}, #{item.questionJson}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},)
</foreach>
</insert>
</mapper>

View File

@@ -34,6 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applicationDeadline" column="application_deadline" />
<result property="posted" column="posted" />
<result property="languages" column="languages" />
<result property="aiScreeningVideoFlag" column="ai_screening_video_flag" />
<result property="videoId" column="video_id" />
<result property="speechSpeed" column="speech_speed" />
<result property="dataType" column="data_type" />
<result property="operStep" column="oper_step" />
<result property="status" column="status" />
@@ -49,7 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, uuid,recruiter_id, role_name,company_name,role_type, location_type, locations, applied, job_Level, job_type, job_experience, salary_start, salary_end, required_skills_json,
nice_to_have_skills_json, education_requirements_json, accept_equivalent_work_flag,
certifications_licenses_json, description_tone, about_role, responsibilities, role_benefits_json,
publishing_channels_json, publishing_schedule_date, publishing_schedule_time, application_deadline, posted, languages,data_type,
publishing_channels_json, publishing_schedule_date, publishing_schedule_time, application_deadline,
posted, languages,ai_screening_video_flag,video_id,speech_speed,data_type,
oper_step, status,del_flag, create_by, create_time, update_by, update_time, remark from hotake_roles_info
</sql>
@@ -128,6 +134,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="publishingScheduleTime != null">publishing_schedule_time,</if>
<if test="applicationDeadline != null">application_deadline,</if>
<if test="posted != null">posted,</if>
<if test="aiScreeningVideoFlag != null">ai_screening_video_flag,</if>
<if test="videoId != null">video_id,</if>
<if test="speechSpeed != null">speech_speed,</if>
<if test="languages != null">languages,</if>
<if test="dataType != null">data_type,</if>
<if test="operStep != null">oper_step,</if>
@@ -167,6 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="publishingScheduleTime != null">#{publishingScheduleTime},</if>
<if test="applicationDeadline != null">#{applicationDeadline},</if>
<if test="posted != null">#{posted},</if>
<if test="aiScreeningVideoFlag != null">#{aiScreeningVideoFlag},</if>
<if test="videoId != null">#{videoId},</if>
<if test="speechSpeed != null">#{speechSpeed},</if>
<if test="languages != null">#{languages},</if>
<if test="dataType != null">#{dataType},</if>
<if test="operStep != null">#{operStep},</if>
@@ -209,6 +225,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="publishingScheduleTime != null">publishing_schedule_time = #{publishingScheduleTime},</if>
<if test="applicationDeadline != null">application_deadline = #{applicationDeadline},</if>
<if test="posted != null">posted = #{posted},</if>
<if test="aiScreeningVideoFlag != null">ai_screening_video_flag = #{aiScreeningVideoFlag},</if>
<if test="videoId != null">video_id = #{videoId},</if>
<if test="speechSpeed != null">speech_speed = #{speechSpeed},</if>
<if test="languages != null">languages = #{languages},</if>
<if test="dataType != null">data_type = #{dataType},</if>
<if test="operStep != null">oper_step = #{operStep},</if>
@@ -252,6 +273,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
publishing_schedule_time = #{publishingScheduleTime},
application_deadline = #{applicationDeadline},
posted = #{posted},
aiScreeningVideoFlag = #{ai_screening_video_flag},
videoId = #{video_id},
speech_speed = #{speechSpeed},
languages = #{languages},
data_type = #{dataType},
oper_step = #{operStep},

View File

@@ -11,6 +11,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dictLabel" column="dict_label" />
<result property="dictValue" column="dict_value" />
<result property="dictType" column="dict_type" />
<result property="dataType" column="data_type" />
<result property="fileUrl" column="file_url" />
<result property="avatarUrl" column="avatar_url" />
<result property="cssClass" column="css_class" />
<result property="listClass" column="list_class" />
<result property="isDefault" column="is_default" />
@@ -19,10 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="selectDictDataVo">
select dict_code, dict_parent_code,dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
select dict_code, dict_parent_code,dict_sort, dict_label, dict_value, dict_type,data_type,file_url, avatar_url,css_class, list_class, is_default, status, create_by, create_time, remark
from sys_dict_data
</sql>

View File

@@ -11,6 +11,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dictLabel" column="dict_label" />
<result property="dictValue" column="dict_value" />
<result property="dictType" column="dict_type" />
<result property="dataType" column="data_type" />
<result property="fileUrl" column="file_url" />
<result property="avatarUrl" column="avatar_url" />
<result property="cssClass" column="css_class" />
<result property="listClass" column="list_class" />
<result property="isDefault" column="is_default" />
@@ -19,10 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="selectDictDataVo">
select dict_code, dict_parent_code,dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
select dict_code, dict_parent_code,dict_sort, dict_label, dict_value, dict_type,data_type,file_url, avatar_url,css_class, list_class, is_default, status, create_by, create_time, remark
from sys_dict_data
</sql>