提交 587589ef 作者: obcy

【专题状态开启关闭校验调度是否存在】

上级 b7b31b4d
......@@ -404,9 +404,15 @@ public class SubjectManageController {
public Result<?> updateStatus(@RequestBody Subject subject) {
subjectService.updateStatus(subject);
Subject byId = subjectService.getById(subject.getId());
xxlJobInfoService.update(Wrappers.<XxlJobInfo>lambdaUpdate()
.eq(XxlJobInfo::getInfoSourceCode, byId.getSubjectCode())
.set(XxlJobInfo::getTriggerStatus, byId.getStatus()));
List<XxlJobInfo> list = xxlJobInfoService.list(Wrappers.<XxlJobInfo>lambdaQuery().eq(XxlJobInfo::getInfoSourceCode, byId.getSubjectCode()));
if (CollectionUtils.isNotEmpty(list)) {
xxlJobInfoService.update(Wrappers.<XxlJobInfo>lambdaUpdate()
.eq(XxlJobInfo::getInfoSourceCode, byId.getSubjectCode())
.set(XxlJobInfo::getTriggerStatus, byId.getStatus()));
}else{
xxlJobInfoService.subjectInsert(byId);
}
if (subject.getStatus() == 1) {
kafkaTemplate.send(SUBJECT_MODEL_KAFKA_CHANNEL, byId.getSubjectCode());
configurationMessageService.bindInfoSourceSend(subject.getId());
......@@ -444,6 +450,7 @@ public class SubjectManageController {
configurationMessageService.bindInfoSourceSend(subject.getId());
configurationMessageService.bindKeyWordsSend(subject.getId());
caiJiCenterHttpService.subjectStatusEdit(subject.getStatus(), subject.getId());
configurationMessageService.subjectEnterpriseSourceSync(subject.getId());
log.info("专题配置信息同步采集成功:{}",subject.getSubjectName());
}else{
caiJiCenterHttpService.delSubject(subject.getId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论