提交 8c6cc457 作者: obcy

【修改配置通知采集】

上级 34747ca4
......@@ -118,6 +118,10 @@ public class ConfigurationMessageService {
private String keyWordsbindUrl;
@Value("${caiji.keyWordsEdit.url:http://1.95.79.85:8823/baseSourceInfo/api/keyword/edit}")
private String keyWordsEditUrl;
@Value("${caiji.allInfosourcebind.url:http://1.95.79.85:8823/baseSourceInfo/api/subject/infoSourceSave}")
private String allInfosourcebindUrl;
@Value("${caiji.allKeyWordsBind.url:http://1.95.79.85:8823/baseSourceInfo/api/subject/keywordSave}")
private String allKeyWordsBindUrl;
@Value("${caiji.projectCode:zzsn}")
private String projectCode;
@Value("${caiji.projectName:克虏宝}")
......@@ -324,7 +328,7 @@ public class ConfigurationMessageService {
log.info("专题关键词配置通知采集{}",keyWordsParam);
String post = HttpUtil.post(keyWordsbindUrl, keyWordsParam);
String post = HttpUtil.post(allKeyWordsBindUrl, keyWordsParam);
JSONObject entries = JSONUtil.parseObj(post);
//获取code状态码
Integer code = entries.getInt("code");
......@@ -354,7 +358,7 @@ public class ConfigurationMessageService {
}
log.info("专题信息源配置通知采集{}",getparam);
String post = HttpUtil.post(infosourcebindUrl, getparam);
String post = HttpUtil.post(allInfosourcebindUrl, getparam);
JSONObject entries = JSONUtil.parseObj(post);
//获取code状态码
Integer code = entries.getInt("code");
......
......@@ -58,6 +58,9 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i
private CodeGenerateUtil codeGenerateUtil;
@Autowired
private RedisUtil redisUtil;
@Autowired
private ConfigurationMessageService configurationMessageService;
@Resource
private KafkaTemplate<String,String> kafkaTemplate;
......@@ -168,6 +171,10 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i
if (StringUtils.isNotEmpty(keyWordsTypeId)) {
addMapMain(keyWords, keyWordsTypeId);
}
//通知采集更新配置
//同步配置到采集
configurationMessageService.sendEditKeyWordsConfigurationMessage(keyWords.getId());
}
@Override
......
......@@ -46,6 +46,9 @@ public class SubjectInfoSourceMapServiceImpl extends ServiceImpl<SubjectInfoSour
private InfoSourceGroupService infoSourceGroupService;
@Autowired
private ScoreModelService scoreModelService;
@Autowired
private ConfigurationMessageService configurationMessageService;
@Override
@Transactional
......@@ -200,6 +203,9 @@ public class SubjectInfoSourceMapServiceImpl extends ServiceImpl<SubjectInfoSour
}
this.saveBatch(mapList);
//同步配置到采集
configurationMessageService.bindInfoSourceSend(subjectPage.getId());
}
@Override
......@@ -246,6 +252,8 @@ public class SubjectInfoSourceMapServiceImpl extends ServiceImpl<SubjectInfoSour
if (directionIds != null && directionIds.size() > 0) {
baseMapper.deleteInfoSourceIds(subjectPage.getId(), directionIds, BindTypeEnum.DIRECTIONA_INFO_SOURCE_GROUP.getvalue());
}
//同步配置到采集
configurationMessageService.bindInfoSourceSend(subjectPage.getId());
}
@Override
......
......@@ -94,6 +94,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
private IKeyWordsService iKeyWordsService;
@Autowired
private IClbModelArrangeService clbModelArrangeService;
@Autowired
private ConfigurationMessageService configurationMessageService;
@Value("${python.subjectProcessorUrl}")
private String subjectProcessorUrl;
......@@ -303,6 +305,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
subjectInfoSourceMapService.save(subjectInfoSourceMap);
}
}
//同步配置到采集
configurationMessageService.bindInfoSourceSend(subjectId);
}
@Override
......@@ -327,6 +331,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
subjectInfoSourceMapService.save(subjectInfoSourceMap);
}
}
//同步配置到采集
configurationMessageService.bindInfoSourceSend(subjectId);
}
@Override
......@@ -345,6 +351,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
.eq(SubjectInfoSourceMap::getType, 3);
subjectInfoSourceMapService.remove(queryWrapper);
}
//同步配置到采集
configurationMessageService.bindInfoSourceSend(subjectId);
}
@Override
......@@ -362,6 +370,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
subjectKeywordsMapService.saveBatch(mapList);
}
//同步配置到采集
configurationMessageService.bindKeyWordsSend(subjectPage.getId());
}
@Override
......@@ -378,6 +388,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
redisUtil.del(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWordsPage.getWordsCode());
}
}
//同步配置到采集
configurationMessageService.bindKeyWordsSend(subjectPage.getId());
}
@Override
......
......@@ -63,6 +63,8 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
private ISubjectModelMapService subjectModelMapService;
@Autowired
private ScoreModelService scoreModelService;
@Autowired
private ConfigurationMessageService configurationMessageService;
@Autowired
private EsService esService;
......@@ -117,6 +119,9 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
scoreModel.setType("1");
scoreModel.setData(defaultConfig);
scoreModelService.save(scoreModel);
//同步配置到采集
configurationMessageService.bindInfoSourceSend(subjectId);
configurationMessageService.bindKeyWordsSend(subjectId);
return subject;
}
......@@ -252,6 +257,9 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
//关键词绑定
List<SearchWordVO> keywords = subjectSimpleVO.getKeywords();
modifyKeyword(subjectSimpleVO.getId(), subjectSimpleVO.getSubjectName(), keywords);
//同步配置到采集
configurationMessageService.bindInfoSourceSend(subjectSimpleVO.getId());
configurationMessageService.bindKeyWordsSend(subjectSimpleVO.getId());
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论