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) {