Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
2305cc83
提交
2305cc83
authored
4月 11, 2025
作者:
yanxin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
专题修改状态通知采集问题修改
上级
5e8d1b75
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
17 行删除
+19
-17
SubjectManageController.java
...va/com/zzsn/event/controller/SubjectManageController.java
+2
-0
ConfigurationMessageService.java
.../zzsn/event/service/impl/ConfigurationMessageService.java
+17
-17
没有找到文件。
src/main/java/com/zzsn/event/controller/SubjectManageController.java
浏览文件 @
2305cc83
...
@@ -407,6 +407,8 @@ public class SubjectManageController {
...
@@ -407,6 +407,8 @@ public class SubjectManageController {
.
set
(
XxlJobInfo:
:
getTriggerStatus
,
byId
.
getStatus
()));
.
set
(
XxlJobInfo:
:
getTriggerStatus
,
byId
.
getStatus
()));
if
(
subject
.
getStatus
()
==
1
)
{
if
(
subject
.
getStatus
()
==
1
)
{
kafkaTemplate
.
send
(
SUBJECT_MODEL_KAFKA_CHANNEL
,
byId
.
getSubjectCode
());
kafkaTemplate
.
send
(
SUBJECT_MODEL_KAFKA_CHANNEL
,
byId
.
getSubjectCode
());
configurationMessageService
.
bindInfoSourceSend
(
subject
.
getId
());
configurationMessageService
.
bindKeyWordsSend
(
subject
.
getId
());
}
}
try
{
try
{
String
res
=
caiJiCenterHttpService
.
subjectStatusEdit
(
subject
.
getStatus
(),
subject
.
getId
());
String
res
=
caiJiCenterHttpService
.
subjectStatusEdit
(
subject
.
getStatus
(),
subject
.
getId
());
...
...
src/main/java/com/zzsn/event/service/impl/ConfigurationMessageService.java
浏览文件 @
2305cc83
...
@@ -299,9 +299,14 @@ public class ConfigurationMessageService {
...
@@ -299,9 +299,14 @@ public class ConfigurationMessageService {
}
}
public
void
bindKeyWordsSend
(
String
subjectId
)
{
public
void
bindKeyWordsSend
(
String
subjectId
)
{
try
{
remoteModelService
.
delSubjectCache
(
subjectId
);
}
catch
(
Exception
e
)
{
log
.
error
(
"删除专题缓存失败{}"
,
e
.
getMessage
(),
e
);
}
Subject
byId
=
subjectService
.
getById
(
subjectId
);
Subject
byId
=
subjectService
.
getById
(
subjectId
);
if
(
byId
==
null
)
{
if
(
byId
==
null
||
byId
.
getStatus
()
==
null
||
byId
.
getStatus
()
!=
1
)
{
log
.
info
(
"未查询到专题"
);
log
.
info
(
"未查询到专题
或专题未启用
"
);
return
;
return
;
}
}
List
<
String
>
subjectIdList
=
new
ArrayList
<>();
List
<
String
>
subjectIdList
=
new
ArrayList
<>();
...
@@ -325,16 +330,11 @@ public class ConfigurationMessageService {
...
@@ -325,16 +330,11 @@ public class ConfigurationMessageService {
throw
new
RuntimeException
(
"专题关键词配置通知采集失败"
);
throw
new
RuntimeException
(
"专题关键词配置通知采集失败"
);
}
}
log
.
info
(
"{}专题关键词配置通知采集结束"
,
byId
.
getSubjectName
());
log
.
info
(
"{}专题关键词配置通知采集结束"
,
byId
.
getSubjectName
());
try
{
remoteModelService
.
delSubjectCache
(
subjectId
);
}
catch
(
Exception
e
)
{
log
.
error
(
"删除专题缓存失败{}"
,
e
.
getMessage
(),
e
);
}
}
}
public
void
bindKeyWordsEventSend
(
String
eventId
)
{
public
void
bindKeyWordsEventSend
(
String
eventId
)
{
Event
byId
=
eventService
.
getById
(
eventId
);
Event
byId
=
eventService
.
getById
(
eventId
);
if
(
byId
==
null
)
{
if
(
byId
==
null
||
byId
.
getStatus
()
==
null
||
byId
.
getStatus
()
!=
1
)
{
log
.
info
(
"未查询到事件"
);
log
.
info
(
"未查询到事件
或事件未启用
"
);
return
;
return
;
}
}
List
<
String
>
subjectIdList
=
new
ArrayList
<>();
List
<
String
>
subjectIdList
=
new
ArrayList
<>();
...
@@ -362,13 +362,18 @@ public class ConfigurationMessageService {
...
@@ -362,13 +362,18 @@ public class ConfigurationMessageService {
public
void
bindInfoSourceSend
(
String
subjectId
){
public
void
bindInfoSourceSend
(
String
subjectId
){
try
{
remoteModelService
.
delSubjectCache
(
subjectId
);
}
catch
(
Exception
e
)
{
log
.
error
(
"删除专题缓存失败{}"
,
e
.
getMessage
(),
e
);
}
Subject
byId
=
subjectService
.
getById
(
subjectId
);
Subject
byId
=
subjectService
.
getById
(
subjectId
);
if
(
byId
==
null
)
{
if
(
byId
==
null
||
byId
.
getStatus
()
==
null
||
byId
.
getStatus
()
!=
1
)
{
log
.
info
(
"未查询到专题或专题未启用"
);
return
;
return
;
}
}
//只有启用状态的专题才需要通知采集更新绑定数据
List
<
String
>
bindIds
=
getAllInfoSourceIds
(
subjectId
);
List
<
String
>
bindIds
=
getAllInfoSourceIds
(
subjectId
);
String
getparam
;
String
getparam
;
if
(
CollectionUtil
.
isNotEmpty
(
bindIds
))
{
if
(
CollectionUtil
.
isNotEmpty
(
bindIds
))
{
getparam
=
getparam
(
byId
,
null
,
bindIds
);
getparam
=
getparam
(
byId
,
null
,
bindIds
);
...
@@ -386,11 +391,6 @@ public class ConfigurationMessageService {
...
@@ -386,11 +391,6 @@ public class ConfigurationMessageService {
throw
new
RuntimeException
(
"专题信息源配置通知采集失败"
);
throw
new
RuntimeException
(
"专题信息源配置通知采集失败"
);
}
}
log
.
info
(
"{}专题信息源配置通知采集结束"
,
byId
.
getSubjectName
());
log
.
info
(
"{}专题信息源配置通知采集结束"
,
byId
.
getSubjectName
());
try
{
remoteModelService
.
delSubjectCache
(
subjectId
);
}
catch
(
Exception
e
)
{
log
.
error
(
"删除专题缓存失败{}"
,
e
.
getMessage
(),
e
);
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论