diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeAiInterviewQuestionsInfoController.java b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeAiInterviewQuestionsInfoController.java new file mode 100644 index 0000000..8b79fd7 --- /dev/null +++ b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeAiInterviewQuestionsInfoController.java @@ -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 pageList(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo) + { + startPage(); + List list = hotakeAiInterviewQuestionsInfoService.selectHotakeAiInterviewQuestionsInfoList(hotakeAiInterviewQuestionsInfo); + return getWebDataTable(list); + } + + /** + * 查询AI面试问题信息列表(无分页) + */ + @ApiOperation("查询AI面试问题信息列表(无分页)") + @GetMapping("/getList") + public R> list(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo) + { + List list = hotakeAiInterviewQuestionsInfoService.selectHotakeAiInterviewQuestionsInfoList(hotakeAiInterviewQuestionsInfo); + return R.ok(list); + } + + /** + * 获取AI面试问题信息详细信息 + */ + @ApiOperation("获取AI面试问题信息详细信息") + @GetMapping(value = "/{id}") + public R 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)); + } +} diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java b/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java index b6c60a9..eb74b06 100644 --- a/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java +++ b/vetti-admin/src/main/java/com/vetti/web/controller/system/SysDictDataController.java @@ -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> dictType(@PathVariable String dictType) + public R> 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 data = dictTypeService.selectDictDataByType(dictType); if (StringUtils.isNull(data)) diff --git a/vetti-common/src/main/java/com/vetti/common/core/domain/entity/SysDictData.java b/vetti-common/src/main/java/com/vetti/common/core/domain/entity/SysDictData.java index 2437d7e..ffdf1af 100644 --- a/vetti-common/src/main/java/com/vetti/common/core/domain/entity/SysDictData.java +++ b/vetti-common/src/main/java/com/vetti/common/core/domain/entity/SysDictData.java @@ -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 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) diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeAiInterviewQuestionsInfo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeAiInterviewQuestionsInfo.java new file mode 100644 index 0000000..ee46c5e --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeAiInterviewQuestionsInfo.java @@ -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 aiQuestionList; + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java index 40e8c97..38f26e3 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesInfo.java @@ -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:发布Job,draft:草稿,template:模版)") private String dataType; diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/AiQuestionDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/AiQuestionDto.java new file mode 100644 index 0000000..2be41e6 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/AiQuestionDto.java @@ -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; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeRolesInfoDto.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeRolesInfoDto.java index 839b8ac..295dfa6 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeRolesInfoDto.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/dto/HotakeRolesInfoDto.java @@ -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 initialScreeningQuestionsInfoList; + @ApiModelProperty("AI面试问题数据集合") + private List aiInterviewQuestionsInfoList; + } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeAiInterviewQuestionsInfoMapper.java b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeAiInterviewQuestionsInfoMapper.java new file mode 100644 index 0000000..46bc0ee --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeAiInterviewQuestionsInfoMapper.java @@ -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 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 hotakeAiInterviewQuestionsInfoList); + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeAiInterviewQuestionsInfoService.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeAiInterviewQuestionsInfoService.java new file mode 100644 index 0000000..b8beb42 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeAiInterviewQuestionsInfoService.java @@ -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 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 hotakeAiInterviewQuestionsInfoList); + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiInterviewQuestionsInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiInterviewQuestionsInfoServiceImpl.java new file mode 100644 index 0000000..2b70758 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiInterviewQuestionsInfoServiceImpl.java @@ -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 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 selectHotakeAiInterviewQuestionsInfoList(HotakeAiInterviewQuestionsInfo hotakeAiInterviewQuestionsInfo) + { + List 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 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 hotakeAiInterviewQuestionsInfoList){ + return hotakeAiInterviewQuestionsInfoMapper.batchInsertHotakeAiInterviewQuestionsInfo(hotakeAiInterviewQuestionsInfoList); + } +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java index b8af300..408a5c7 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesInfoServiceImpl.java @@ -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 questionsInfoList = hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoList(queryQuestion); dto.setInitialScreeningQuestionsInfoList(questionsInfoList); + + HotakeAiInterviewQuestionsInfo queryAiQuestion = new HotakeAiInterviewQuestionsInfo(); + queryAiQuestion.setRoleId(id); + List 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 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); + } } diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml new file mode 100644 index 0000000..e18a831 --- /dev/null +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into hotake_ai_interview_questions_info + + role_id, + recruiter_id, + question_title, + overview, + focus_type, + question_json, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{roleId}, + #{recruiterId}, + #{questionTitle}, + #{overview}, + #{focusType}, + #{questionJson}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update hotake_ai_interview_questions_info + + role_id = #{roleId}, + recruiter_id = #{recruiterId}, + question_title = #{questionTitle}, + overview = #{overview}, + focus_type = #{focusType}, + question_json = #{questionJson}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from hotake_ai_interview_questions_info where id = #{id} + + + + delete from hotake_ai_interview_questions_info where id in + + #{id} + + + + + 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 + + ( #{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},) + + + \ No newline at end of file diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml index 23b4d74..42ab9c8 100644 --- a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesInfoMapper.xml @@ -34,6 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + @@ -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 @@ -128,6 +134,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" publishing_schedule_time, application_deadline, posted, + + ai_screening_video_flag, + video_id, + speech_speed, + languages, data_type, oper_step, @@ -167,6 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{publishingScheduleTime}, #{applicationDeadline}, #{posted}, + + #{aiScreeningVideoFlag}, + #{videoId}, + #{speechSpeed}, + #{languages}, #{dataType}, #{operStep}, @@ -209,6 +225,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" publishing_schedule_time = #{publishingScheduleTime}, application_deadline = #{applicationDeadline}, posted = #{posted}, + + ai_screening_video_flag = #{aiScreeningVideoFlag}, + video_id = #{videoId}, + speech_speed = #{speechSpeed}, + languages = #{languages}, data_type = #{dataType}, oper_step = #{operStep}, @@ -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}, diff --git a/vetti-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/vetti-system/src/main/resources/mapper/system/SysDictDataMapper.xml index 37dde18..201b1ce 100644 --- a/vetti-system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/vetti-system/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -11,6 +11,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + @@ -19,10 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - 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 diff --git a/vetti-system/target/classes/mapper/system/SysDictDataMapper.xml b/vetti-system/target/classes/mapper/system/SysDictDataMapper.xml index 37dde18..201b1ce 100644 --- a/vetti-system/target/classes/mapper/system/SysDictDataMapper.xml +++ b/vetti-system/target/classes/mapper/system/SysDictDataMapper.xml @@ -11,6 +11,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + @@ -19,10 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - 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