From ea3cb4dead4abeb1b6986febbf132fc27e2a1f6d Mon Sep 17 00:00:00 2001 From: zk Date: Mon, 10 Aug 2026 18:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8F=96=E6=8A=80=E8=83=BD=E7=BB=B4?= =?UTF-8?q?=E5=BA=A6=20=E8=A1=A5=E5=85=85=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/UserProfileAnalyzeService.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/manager/src/main/java/org/jiayunet/service/UserProfileAnalyzeService.java b/manager/src/main/java/org/jiayunet/service/UserProfileAnalyzeService.java index 0a8c048..c269f53 100644 --- a/manager/src/main/java/org/jiayunet/service/UserProfileAnalyzeService.java +++ b/manager/src/main/java/org/jiayunet/service/UserProfileAnalyzeService.java @@ -23,7 +23,7 @@ import java.util.stream.StreamSupport; * 用户简历分析服务 *

主要功能:用户保存简历后异步分析,提取学校等级、经历质量、专业、技能等维度数据

*

依赖:AiChatAbility(AI调用)、DictCacheService(专业分类缓存)

- *

使用表:bg_user_profile(主表,读取/更新)、bg_user_profile_*(5张子表,读取)、 + *

使用表:bg_user_profile(主表,读取/更新)、bg_user_profile_*(6张子表,读取)、 * bg_skill_tag(技能入库)、bg_user_profile_skill_tag_relation(关联表)

* * @author zk @@ -56,6 +56,9 @@ public class UserProfileAnalyzeService { @Autowired private UserProfileCompetitionMapper competitionMapper; + @Autowired + private UserProfileOrganizationMapper organizationMapper; + @Autowired private SkillTagMapper skillTagMapper; @@ -94,15 +97,16 @@ public class UserProfileAnalyzeService { List internshipList = internshipMapper.selectList(new LambdaQueryWrapper().eq(UserProfileInternship::getUserId, userId)); List projectList = projectMapper.selectList(new LambdaQueryWrapper().eq(UserProfileProject::getUserId, userId)); List competitionList = competitionMapper.selectList(new LambdaQueryWrapper().eq(UserProfileCompetition::getUserId, userId)); + List organizationList = organizationMapper.selectList(new LambdaQueryWrapper().eq(UserProfileOrganization::getUserId, userId)); // 2. 数据有效性检查 - if (educationList.isEmpty() && workList.isEmpty() && internshipList.isEmpty() && projectList.isEmpty() && competitionList.isEmpty()) { + if (educationList.isEmpty() && workList.isEmpty() && internshipList.isEmpty() && projectList.isEmpty() && competitionList.isEmpty() && organizationList.isEmpty()) { log.info("用户所有子表为空,清空技能标签, userId={}", userId); clearSkillRelations(userId); return; } - String profileJson = buildProfileJson(profile, educationList, workList, internshipList, projectList, competitionList); + String profileJson = buildProfileJson(profile, educationList, workList, internshipList, projectList, competitionList, organizationList); // 3. 第一次AI:简历综合分析(失败不影响后续) try { @@ -445,16 +449,20 @@ public class UserProfileAnalyzeService { /** 构建用户简历JSON */ private String buildProfileJson(UserProfile profile, List educationList, List workList, List internshipList, - List projectList, List competitionList) { + List projectList, List competitionList, + List organizationList) { Map data = new HashMap<>(); data.put("name", profile.getName()); data.put("skills", profile.getSkills()); data.put("certificates", profile.getCertificates()); + data.put("hobbies", profile.getHobbies()); + data.put("languageSkills", profile.getLanguageSkills()); data.put("education", educationList); data.put("work", workList); data.put("internship", internshipList); data.put("project", projectList); data.put("competition", competitionList); + data.put("organization", organizationList); try { return HttpTool.objectMapper.writeValueAsString(data); } catch (Exception e) {