Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
a72309fd
提交
a72309fd
authored
4月 10, 2025
作者:
yanxin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据新增bug修改,采集库支持指定索引
上级
145d581c
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
6 行删除
+9
-6
EsService.java
src/main/java/com/zzsn/event/es/EsService.java
+7
-2
InformationServiceImpl.java
...a/com/zzsn/event/service/impl/InformationServiceImpl.java
+2
-4
没有找到文件。
src/main/java/com/zzsn/event/es/EsService.java
浏览文件 @
a72309fd
...
...
@@ -609,7 +609,7 @@ public class EsService {
* @date 2024/5/6
*/
public
IPage
<
EventDataVO
>
collectPageList
(
InfoDataSearchCondition
eventDataCondition
)
{
S
earchRequest
searchRequest
=
new
SearchRequest
(
Constants
.
COLLECT_INDEX
)
;
S
tring
index
=
Constants
.
COLLECT_INDEX
;
if
(
"1"
.
equals
(
eventDataCondition
.
getIsSubject
()))
{
Subject
byId
=
subjectService
.
getById
(
eventDataCondition
.
getSubjectId
());
//更新开始、结束时间
...
...
@@ -625,10 +625,15 @@ public class EsService {
eventDataCondition
.
setEndTime
(
timeDisable
);
}
}
//以专题指定的索引为准
if
(
StringUtils
.
isNotEmpty
(
byId
.
getEsIndex
())){
index
=
byId
.
getEsIndex
();
}
}
SearchRequest
searchRequest
=
new
SearchRequest
(
index
);
//根据检索开始结束时间确定索引范围
String
firstIndex
=
LocalDate
.
now
().
minusMonths
(
23
).
toString
();
if
(
StringUtils
.
isNotEmpty
(
eventDataCondition
.
getStartTime
())
&&
eventDataCondition
.
getStartTime
().
compareTo
(
firstIndex
)
>
0
)
{
if
(
Constants
.
COLLECT_INDEX
.
equals
(
index
)
&&
StringUtils
.
isNotEmpty
(
eventDataCondition
.
getStartTime
())
&&
eventDataCondition
.
getStartTime
().
compareTo
(
firstIndex
)
>
0
)
{
String
[]
indexs
=
EsIndexUtil
.
getIndexMonth
(
Constants
.
COLLECT_INDEX
,
eventDataCondition
.
getStartTime
(),
eventDataCondition
.
getEndTime
());
searchRequest
=
new
SearchRequest
(
indexs
);
}
...
...
src/main/java/com/zzsn/event/service/impl/InformationServiceImpl.java
浏览文件 @
a72309fd
...
...
@@ -552,8 +552,7 @@ public class InformationServiceImpl implements InformationService {
e
.
setAttachmentId
(
attachmentInfo
.
getId
().
toString
());
});
}
String
index
=
Constants
.
SUBJECT_INDEX
;
esOpUtil
.
docSavaByEntity
(
index
,
specialInformation
.
getId
(),
specialInformation
);
esOpUtil
.
docSavaByEntity
(
EsIndexUtil
.
getIndexYear
(
Constants
.
SUBJECT_INDEX
),
specialInformation
.
getId
(),
specialInformation
);
// 发送数据生命周期日志 入专题库 新增消息到kafka
final
Subjectdatabase
subjectdatabase
=
new
Subjectdatabase
();
BeanUtil
.
copyProperties
(
specialInformation
,
subjectdatabase
,
CopyOptions
.
create
().
ignoreError
().
ignoreNullValue
());
...
...
@@ -924,8 +923,7 @@ public class InformationServiceImpl implements InformationService {
}
specialInformation
.
setCreateDate
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd'T'HH:mm:ss"
));
specialInformation
.
setProcessDate
(
specialInformation
.
getCreateDate
());
String
index
=
Constants
.
SUBJECT_INDEX
+
"_"
+
DateUtils
.
getYear
();
esOpUtil
.
docSavaByEntity
(
index
,
specialInformation
.
getId
(),
specialInformation
);
esOpUtil
.
docSavaByEntity
(
EsIndexUtil
.
getIndexYear
(
Constants
.
SUBJECT_INDEX
),
specialInformation
.
getId
(),
specialInformation
);
clbFileOperationLog
.
getClbFileOperationLogDetails
().
add
(
clbFileOperationLogDetailsService
.
buildFailDetails
(
info
.
get
(
1
),
info
.
get
(
5
),
info
.
get
(
7
)));
}
catch
(
NumberFormatException
e
)
{
ClbFileOperationLogDetails
clbFileOperationLogDetails
=
clbFileOperationLogDetailsService
.
buildFailDetails
(
info
.
get
(
1
),
info
.
get
(
5
),
info
.
get
(
7
),
"插入es异常"
+
e
.
getMessage
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论