简历生产个人信息接口 全量AI 同步

This commit is contained in:
zk
2026-07-15 11:35:07 +08:00
parent 00940e610f
commit a550b892af
2 changed files with 10 additions and 3 deletions
@@ -324,7 +324,7 @@ public class UserProfileService {
/**
* 根据简历ID同步更新个人资料
* <p>1. 校验简历归属 2. 读取简历主表+5子表 3. 事务内覆盖写入Profile主表+5子表 4. 触发一次异步AI分析</p>
* <p>1. 校验简历归属 2. 读取简历主表+5子表 3. 事务内覆盖写入Profile主表+5子表 4. 同步执行一次AI分析</p>
*/
@Transactional(rollbackFor = Exception.class)
public void syncProfileFromResume(Long resumeId) {
@@ -486,8 +486,8 @@ public class UserProfileService {
competitionMapper.batchInsert(profileCompetitionList);
}
// 9. 事务内所有数据写入完成,触发一次异步AI分析
userProfileAnalyzeService.analyzeUserProfile(userId);
// 9. 事务内所有数据写入完成,同步执行AI分析并等待完成
userProfileAnalyzeService.analyzeUserProfileSync(userId);
}
// ==================== 从个人资料生成简历 ====================
@@ -71,6 +71,13 @@ public class UserProfileAnalyzeService {
*/
@Async("userProfileAsyncExecutor")
public void analyzeUserProfile(Long userId) {
analyzeUserProfileSync(userId);
}
/**
* 同步分析用户简历,供需要等待全部分析完成的业务调用。
*/
public void analyzeUserProfileSync(Long userId) {
try {
log.info("开始分析用户简历, userId={}", userId);