Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
e034277d
提交
e034277d
authored
2月 28, 2025
作者:
925993793@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【fix】批量添加至精选接口,兼容复合专题逻辑
上级
09c5e342
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
34 行增加
和
3 行删除
+34
-3
InformationServiceImpl.java
...a/com/zzsn/event/service/impl/InformationServiceImpl.java
+1
-2
SubjectSimpleServiceImpl.java
...com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
+24
-1
InfoDataSearchCondition.java
src/main/java/com/zzsn/event/vo/InfoDataSearchCondition.java
+6
-0
Label.java
src/main/java/com/zzsn/event/vo/es/Label.java
+3
-0
没有找到文件。
src/main/java/com/zzsn/event/service/impl/InformationServiceImpl.java
浏览文件 @
e034277d
...
...
@@ -293,7 +293,6 @@ public class InformationServiceImpl implements InformationService {
String
dataSetId
=
searchCondition
.
getDataSetId
();
dataSet
.
setRelationId
(
dataSetId
);
Map
<
String
,
List
<
SpecialInformation
>>
map
=
new
HashMap
<>();
Integer
num
=
searchCondition
.
getNum
();
List
<
SpecialInformation
>
informationList
=
this
.
informationAllList
(
searchCondition
);
formatUpdateMap
(
map
,
informationList
,
dataSet
);
map
.
forEach
((
k
,
v
)
->
esOpUtil
.
docUpdateBulk
(
k
,
v
));
...
...
@@ -940,7 +939,7 @@ public class InformationServiceImpl implements InformationService {
for
(
int
i
=
1
;
;
i
++)
{
searchCondition
.
setPageNo
(
i
);
List
<
SpecialInformation
>
list
=
esService
.
informationList
(
searchCondition
);
log
.
info
(
"
保存数据集:
本次循环-{},数据量为-{}"
,
i
,
list
.
size
());
log
.
info
(
"本次循环-{},数据量为-{}"
,
i
,
list
.
size
());
if
(
CollectionUtils
.
isEmpty
(
list
))
{
break
;
}
...
...
src/main/java/com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
浏览文件 @
e034277d
...
...
@@ -18,6 +18,7 @@ import com.zzsn.event.util.PythonUtil;
import
com.zzsn.event.util.user.UserUtil
;
import
com.zzsn.event.util.user.UserVo
;
import
com.zzsn.event.vo.*
;
import
com.zzsn.event.vo.es.Label
;
import
com.zzsn.event.vo.es.SpecialInformation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
...
...
@@ -368,13 +369,35 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
@Override
public
void
selected
(
InfoDataSearchCondition
searchCondition
)
{
String
[]
fetchFields
=
new
String
[]{
"id"
,
"checkStatus"
};
//勾选的主题信息列表
List
<
Label
>
themeList
=
searchCondition
.
getThemeList
();
String
[]
fetchFields
=
new
String
[]{
"id"
,
"checkStatus"
,
"labels"
};
searchCondition
.
setFetchFields
(
fetchFields
);
Map
<
String
,
List
<
SpecialInformation
>>
updateMap
=
new
HashMap
<>();
List
<
SpecialInformation
>
informationList
=
informationService
.
informationAllList
(
searchCondition
);
for
(
SpecialInformation
information
:
informationList
)
{
String
index
=
information
.
getDbIndex
();
information
.
setCheckStatus
(
1
);
if
(
CollectionUtils
.
isNotEmpty
(
themeList
))
{
List
<
Label
>
labels
=
information
.
getLabels
();
//主题标签
List
<
Label
>
collect
=
labels
.
stream
().
filter
(
e
->
"thematic_information_column"
.
equals
(
e
.
getLabelMark
())).
collect
(
Collectors
.
toList
());
//其他类型的标签
labels
.
removeAll
(
collect
);
List
<
String
>
oldThemeIds
=
collect
.
stream
().
map
(
Label:
:
getRelationId
).
collect
(
Collectors
.
toList
());
List
<
String
>
newThemeIds
=
themeList
.
stream
().
map
(
Label:
:
getRelationId
).
collect
(
Collectors
.
toList
());
for
(
Label
label
:
collect
)
{
if
(
newThemeIds
.
contains
(
label
.
getRelationId
()))
{
labels
.
add
(
label
);
}
}
for
(
Label
label
:
themeList
)
{
if
(!
oldThemeIds
.
contains
(
label
.
getRelationId
()))
{
labels
.
add
(
label
);
}
}
information
.
setLabels
(
labels
);
}
if
(
updateMap
.
containsKey
(
index
))
{
updateMap
.
get
(
index
).
add
(
information
);
}
else
{
...
...
src/main/java/com/zzsn/event/vo/InfoDataSearchCondition.java
浏览文件 @
e034277d
...
...
@@ -147,4 +147,10 @@ public class InfoDataSearchCondition {
//聚合排除的字段值的集合
private
String
[]
excludeValues
;
/*------专题分析类参数---end-------------------*/
/*------添加至精选时,主题列表---start-------------------*/
//聚合分组类型-按日期集合分析时使用
private
List
<
Label
>
themeList
;
/*------添加至精选时,主题列表---end-------------------*/
}
src/main/java/com/zzsn/event/vo/es/Label.java
浏览文件 @
e034277d
...
...
@@ -24,4 +24,7 @@ public class Label {
//关联标签名称
private
String
relationName
;
//得分
private
Integer
status
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论