Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
9ede6a63
提交
9ede6a63
authored
7月 17, 2025
作者:
obcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【支持事件专题】
上级
64a6b71a
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
166 行增加
和
34 行删除
+166
-34
EsService.java
src/main/java/com/zzsn/event/es/EsService.java
+4
-2
SubjectInfoSourceMapMapper.xml
.../com/zzsn/event/mapper/xml/SubjectInfoSourceMapMapper.xml
+158
-32
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+4
-0
没有找到文件。
src/main/java/com/zzsn/event/es/EsService.java
浏览文件 @
9ede6a63
...
@@ -619,8 +619,8 @@ public class EsService {
...
@@ -619,8 +619,8 @@ public class EsService {
*/
*/
public
IPage
<
EventDataVO
>
collectPageList
(
InfoDataSearchCondition
eventDataCondition
)
{
public
IPage
<
EventDataVO
>
collectPageList
(
InfoDataSearchCondition
eventDataCondition
)
{
String
index
=
Constants
.
COLLECT_INDEX
;
String
index
=
Constants
.
COLLECT_INDEX
;
if
(
"1"
.
equals
(
eventDataCondition
.
getIsSubject
()))
{
Subject
byId
=
subjectService
.
getSubjectOrEventById
(
eventDataCondition
.
getSubjectId
());
Subject
byId
=
subjectService
.
getSubjectOrEventById
(
eventDataCondition
.
getSubjectId
());
if
(
"1"
.
equals
(
eventDataCondition
.
getIsSubject
()))
{
//更新开始、结束时间
//更新开始、结束时间
if
(
byId
.
getTimeEnable
()
!=
null
)
{
if
(
byId
.
getTimeEnable
()
!=
null
)
{
String
timeEnable
=
DateUtil
.
format
(
byId
.
getTimeEnable
(),
"yyyy-MM-dd"
);
String
timeEnable
=
DateUtil
.
format
(
byId
.
getTimeEnable
(),
"yyyy-MM-dd"
);
...
@@ -699,8 +699,10 @@ public class EsService {
...
@@ -699,8 +699,10 @@ public class EsService {
infoSourceIdList
.
addAll
(
wordsIdList
);
infoSourceIdList
.
addAll
(
wordsIdList
);
}
}
//装配信息源的条件
//装配信息源的条件
if
(
CollectionUtils
.
isNotEmpty
(
infoSourceIdList
))
{
if
(
!
StrUtil
.
contains
(
byId
.
getDataScope
(),
"1"
)
&&
CollectionUtils
.
isNotEmpty
(
infoSourceIdList
))
{
boolQuery
.
must
(
QueryBuilders
.
termsQuery
(
"sid"
,
infoSourceIdList
.
stream
().
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
())));
boolQuery
.
must
(
QueryBuilders
.
termsQuery
(
"sid"
,
infoSourceIdList
.
stream
().
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
())));
}
else
if
(
StrUtil
.
contains
(
byId
.
getDataScope
(),
"1"
))
{
}
else
{
}
else
{
return
new
Page
<>();
return
new
Page
<>();
}
}
...
...
src/main/java/com/zzsn/event/mapper/xml/SubjectInfoSourceMapMapper.xml
浏览文件 @
9ede6a63
...
@@ -27,67 +27,193 @@
...
@@ -27,67 +27,193 @@
</update>
</update>
<select
id=
"subjectRealBindInfoSourceList"
resultType=
"String"
>
<select
id=
"subjectRealBindInfoSourceList"
resultType=
"String"
>
select distinct a.source_id from
(select distinct x.source_id from (
SELECT
select m.source_id from subject_info_source_map n
distinct x.id
inner join info_source_group_map m on n.source_id = m.group_id
FROM
where n.type in(2,5)
(
SELECT
iso.id
FROM
subject_info_source_map sm
INNER JOIN info_source iso ON sm.source_id = iso.id
WHERE
sm.type IN ( 1, 6 )
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and
n
.subject_id in
and
sm
.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
UNION
union
SELECT
select sm.source_id from subject_info_source_map sm where sm.type in(1,6)
iso.id
FROM
subject_info_source_map sm
INNER JOIN info_source_main im ON im.id = sm.source_id
INNER JOIN info_source iso ON im.id = iso.info_source_id
WHERE
sm.type IN ( 31, 36 )
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and sm.subject_id in
and sm.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
UNION
union
SELECT
select m.entity_code as source_id from subject_info_source_map n
iso.id
inner join clb_label_info_source_map m on n.source_id = m.label_code and n.source_item_id = m.label_item_code
FROM
where n.type in(12,15)
subject_info_source_map sim
INNER JOIN info_source_group_map m ON m.group_id = sim.source_id
INNER JOIN info_source iso ON m.source_id = iso.id
WHERE
sim.type IN ( 2, 5 )
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and sim.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
UNION
SELECT
iso.id
FROM
subject_info_source_map sim
INNER JOIN info_source_main_group_map m ON m.group_id = sim.source_id
INNER JOIN info_source_main im ON im.id = m.source_id
INNER JOIN info_source iso ON im.id = iso.info_source_id
WHERE
sim.type IN ( 32, 35 )
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and n.subject_id in
and sim.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
UNION
SELECT
isoo.id
FROM
subject_info_source_map smm
INNER JOIN clb_label_info_source_map lam ON smm.source_id = lam.label_code
AND smm.source_item_id = lam.label_item_code
INNER JOIN info_source isoo ON lam.entity_code = isoo.id
WHERE
smm.type IN ( 12, 15 )
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and smm.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
UNION
SELECT
isoo.id
FROM
subject_info_source_map smm
INNER JOIN clb_label_main_source_map lam ON smm.source_id = lam.label_code
AND smm.source_item_id = lam.label_item_code
INNER JOIN info_source_main im ON lam.entity_code = im.id
INNER JOIN info_source isoo ON im.id = isoo.info_source_id
WHERE
smm.type IN ( 312, 315 )
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and smm.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
) x) a LEFT JOIN
) x
(select distinct x.source_id from (
WHERE
select m.source_id from subject_info_source_map n
1 = 1
inner join info_source_group_map m on n.source_id = m.group_id
AND x.id NOT IN (
where n.type = 4
SELECT DISTINCT
y.source_id
FROM
(
SELECT
m.source_id
FROM
info_source_group_map m
WHERE
m.group_id IN ( SELECT source_id FROM subject_info_source_map WHERE type = 4
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and
n.
subject_id in
and subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
union
GROUP BY source_id ) UNION
select sm.source_id from subject_info_source_map sm where sm.type = 3
SELECT
iso.id
FROM
subject_info_source_map sim
INNER JOIN info_source_main_group_map m ON m.group_id = sim.source_id
INNER JOIN info_source_main im ON im.id = m.source_id
INNER JOIN info_source iso ON im.id = iso.info_source_id
WHERE
sim.type = 34
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and sim.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
UNION
SELECT
sm.source_id
FROM
subject_info_source_map sm
WHERE
type = 3
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and sm.subject_id in
and sm.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
UNION
union
SELECT
select m.entity_code as source_id from subject_info_source_map n
iso.id
inner join clb_label_info_source_map m on n.source_id = m.label_code and n.source_item_id = m.label_item_code
FROM
where n.type = 14
subject_info_source_map sm
INNER JOIN info_source_main im ON im.id = sm.source_id
INNER JOIN info_source iso ON im.id = iso.info_source_id
WHERE
sm.type = 33
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and n.subject_id in
and sm.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
UNION
SELECT
isoo.id
FROM
subject_info_source_map smm
INNER JOIN clb_label_info_source_map lam ON smm.source_id = lam.label_code
AND smm.source_item_id = lam.label_item_code
INNER JOIN info_source isoo ON lam.entity_code = isoo.id
WHERE
smm.type = 14
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and smm.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
UNION
SELECT
isoo.id
FROM
subject_info_source_map smm
INNER JOIN clb_label_main_source_map lam ON smm.source_id = lam.label_code
AND smm.source_item_id = lam.label_item_code
INNER JOIN info_source_main im ON lam.entity_code = im.id
INNER JOIN info_source isoo ON im.id = isoo.info_source_id
WHERE
smm.type = 314
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and smm.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
) x) b
) y
on (a.source_id = b.source_id)
)
where b.source_id is null
</select>
</select>
<select
id=
"subjectRealBindInfoSources"
resultType=
"com.zzsn.event.vo.SubjectStatisticsVo"
>
<select
id=
"subjectRealBindInfoSources"
resultType=
"com.zzsn.event.vo.SubjectStatisticsVo"
>
...
...
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
9ede6a63
...
@@ -1526,6 +1526,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -1526,6 +1526,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
subject
.
setTimeDisable
(
one
.
getEndTime
());
subject
.
setTimeDisable
(
one
.
getEndTime
());
subject
.
setDataScope
(
one
.
getDataScope
());
subject
.
setDataScope
(
one
.
getDataScope
());
subject
.
setFirstOpenTime
(
one
.
getFirstOpenTime
());
subject
.
setFirstOpenTime
(
one
.
getFirstOpenTime
());
subject
.
setStatus
(
one
.
getStatus
());
}
}
}
}
if
(
ObjectUtil
.
isEmpty
(
subject
)){
if
(
ObjectUtil
.
isEmpty
(
subject
)){
...
@@ -1566,6 +1568,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -1566,6 +1568,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
subject
.
setTimeDisable
(
one
.
getEndTime
());
subject
.
setTimeDisable
(
one
.
getEndTime
());
subject
.
setDataScope
(
one
.
getDataScope
());
subject
.
setDataScope
(
one
.
getDataScope
());
subject
.
setFirstOpenTime
(
one
.
getFirstOpenTime
());
subject
.
setFirstOpenTime
(
one
.
getFirstOpenTime
());
subject
.
setStatus
(
one
.
getStatus
());
}
}
}
}
if
(
ObjectUtil
.
isEmpty
(
subject
)){
if
(
ObjectUtil
.
isEmpty
(
subject
)){
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论