diff --git a/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java b/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java index 936c4db..ea68655 100644 --- a/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java +++ b/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java @@ -720,7 +720,7 @@ public class AiCommonPromptConstants { * @return */ public static String initializationAttachmentResultMergingPrompt(String basicInformation, String attachmentContent){ - String promptStr = "You are a professional resume writing expert. Please generate a complete resume structure based on the candidate's basic information and analyzed attachment content.\n" + + String promptStr = "You are a professional resume writing expert. Please generate a complete resume structure based on the candidate's basic information and analyzed attachment content.The date should be automatically converted to the standard format of yyyy-MM.\n" + "\n" + "Candidate Basic Information:\n" + basicInformation + 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 index 46bc0ee..923b638 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeAiInterviewQuestionsInfoMapper.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/mapper/HotakeAiInterviewQuestionsInfoMapper.java @@ -51,6 +51,13 @@ public interface HotakeAiInterviewQuestionsInfoMapper */ public int deleteHotakeAiInterviewQuestionsInfoById(Long id); + /** + * 删除AI面试问题信息 + * + * @param roleId + * @return 结果 + */ + public int deleteHotakeAiInterviewQuestionsInfoByRoleId(Long roleId); /** * 批量删除AI面试问题信息 * diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java index 7d71a4d..6bea41b 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java @@ -1034,6 +1034,9 @@ public class HotakeAiCommonToolsServiceImpl extends BaseServiceImpl implements I } questionsInfo.setAiQuestionList(questionDtoList); questionsInfo.setTimes(times.toString()); + questionsInfo.setQuestionJson(JSONUtil.toJsonStr(questionDtoList)); + //先删除数据 + hotakeAiInterviewQuestionsInfoMapper.deleteHotakeAiInterviewQuestionsInfoByRoleId(rolesInfo.getId()); //进行数据更新 hotakeAiInterviewQuestionsInfoMapper.insertHotakeAiInterviewQuestionsInfo(questionsInfo); return questionsInfo; diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeCvInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeCvInfoServiceImpl.java index 6e45840..d6a55aa 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeCvInfoServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeCvInfoServiceImpl.java @@ -547,7 +547,7 @@ public class HotakeCvInfoServiceImpl extends BaseServiceImpl implements IHotakeC List> list = new LinkedList(); Map entity = new HashMap<>(); entity.put("role", "user"); - entity.put("content", "从下面提供的文本中提取所有能识别到的简历信息,只提取原文中存在的内容,不要补充、不推测、不总结。需要提取的字段包括:name(姓名或人名)、phone(电话号码)、email(电子邮件地址)、experienceYear(根据工作经验计算出来的工作年限)、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\\\": \\\"\\\", \\\"experienceYear\\\": \\\"\\\", \\\"links\\\": [{\\\"content\\\":\\\"\\\"}], \\\"about\\\": \\\"\\\", \\\"skillsTools\\\": [{\\\"content\\\":\\\"\\\"}], \\\"languages\\\": [{\\\"content\\\":\\\"\\\"}], \\\"experience\\\": [{\\\"title\\\": \\\"\\\", \\\"company\\\": \\\"\\\",\\\"location\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\",\\\"description\\\": [{\\\"content\\\":\\\"\\\"}]}], \\\"education\\\": [{\\\"degree\\\": \\\"\\\",\\\"institution\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\"}] }。字段不存在则返回 null 或空数组。只返回标准可解析的 JSON结构 ,不要多余的```json等信息,不要解释说明,不要改写内容。以下为待处理文本:" + contents); + entity.put("content", "从下面提供的文本中提取所有能识别到的简历信息,只提取原文中存在的内容,不要补充、不推测、不总结。需要提取的字段包括:name(姓名或人名)、phone(电话号码)、email(电子邮件地址)、experienceYear(根据工作经验计算出来的工作年限)、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\\\": \\\"\\\", \\\"experienceYear\\\": \\\"\\\", \\\"links\\\": [{\\\"content\\\":\\\"\\\"}], \\\"about\\\": \\\"\\\", \\\"skillsTools\\\": [{\\\"content\\\":\\\"\\\"}], \\\"languages\\\": [{\\\"content\\\":\\\"\\\"}], \\\"experience\\\": [{\\\"title\\\": \\\"\\\", \\\"company\\\": \\\"\\\",\\\"location\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\",\\\"description\\\": [{\\\"content\\\":\\\"\\\"}]}], \\\"education\\\": [{\\\"degree\\\": \\\"\\\",\\\"institution\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\"}] }。字段不存在则返回 null 或空数组。只返回标准可解析的 JSON结构 ,不要多余的```json等信息,不要解释说明,不要改写内容,其中日期字段要转换格式为:yyyy-MM。以下为待处理文本:" + contents); //根据AI做 list.add(entity); String resultCv = chatGPTClient.handleAiChat(JSONUtil.toJsonStr(list), "JX"); 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 2b767aa..dd2283d 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 @@ -297,8 +297,7 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota }else{ rolesInfo.setRoleBenefitsJson(""); } - //todo 暂时加在这里,完成第3步的时候,初始化第5步的内容 - createAiQuestion(rolesInfoId); +// createAiQuestion(rolesInfoId); } if(RoleOperStepsEnum.STEPS_4.getCode().equals(hotakeRolesInfo.getOperStep())){ diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml index e18a831..89629be 100644 --- a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeAiInterviewQuestionsInfoMapper.xml @@ -96,6 +96,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" delete from hotake_ai_interview_questions_info where id = #{id} + + delete from hotake_ai_interview_questions_info where role_id = #{roleId} + + delete from hotake_ai_interview_questions_info where id in