简历生产个人信息接口 全量AI 同步
This commit is contained in:
@@ -324,7 +324,7 @@ public class UserProfileService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据简历ID同步更新个人资料
|
* 根据简历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)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void syncProfileFromResume(Long resumeId) {
|
public void syncProfileFromResume(Long resumeId) {
|
||||||
@@ -486,8 +486,8 @@ public class UserProfileService {
|
|||||||
competitionMapper.batchInsert(profileCompetitionList);
|
competitionMapper.batchInsert(profileCompetitionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 9. 事务内所有数据写入完成,触发一次异步AI分析
|
// 9. 事务内所有数据写入完成,同步执行AI分析并等待完成
|
||||||
userProfileAnalyzeService.analyzeUserProfile(userId);
|
userProfileAnalyzeService.analyzeUserProfileSync(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================== 从个人资料生成简历 ====================
|
// ==================== 从个人资料生成简历 ====================
|
||||||
|
|||||||
@@ -71,6 +71,13 @@ public class UserProfileAnalyzeService {
|
|||||||
*/
|
*/
|
||||||
@Async("userProfileAsyncExecutor")
|
@Async("userProfileAsyncExecutor")
|
||||||
public void analyzeUserProfile(Long userId) {
|
public void analyzeUserProfile(Long userId) {
|
||||||
|
analyzeUserProfileSync(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步分析用户简历,供需要等待全部分析完成的业务调用。
|
||||||
|
*/
|
||||||
|
public void analyzeUserProfileSync(Long userId) {
|
||||||
try {
|
try {
|
||||||
log.info("开始分析用户简历, userId={}", userId);
|
log.info("开始分析用户简历, userId={}", userId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user