Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
ce70b2fb
提交
ce70b2fb
authored
6月 23, 2025
作者:
obcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【信息源组绑定解绑--信息源变动通知采集逻辑修改】
上级
6ba8a2c5
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
205 行增加
和
4 行删除
+205
-4
RemoteSystemService.java
...in/java/com/zzsn/event/feign/api/RemoteSystemService.java
+1
-1
SubjectAdditionMapper.java
...ain/java/com/zzsn/event/mapper/SubjectAdditionMapper.java
+2
-0
InfoSourceMainMapper.xml
...n/java/com/zzsn/event/mapper/xml/InfoSourceMainMapper.xml
+2
-2
SubjectAdditionMapper.xml
.../java/com/zzsn/event/mapper/xml/SubjectAdditionMapper.xml
+128
-0
ConfigurationMessageService.java
.../zzsn/event/service/impl/ConfigurationMessageService.java
+0
-0
InfoSourceMainServiceImpl.java
...om/zzsn/event/service/impl/InfoSourceMainServiceImpl.java
+1
-1
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+71
-0
没有找到文件。
src/main/java/com/zzsn/event/feign/api/RemoteSystemService.java
浏览文件 @
ce70b2fb
...
@@ -23,6 +23,6 @@ public interface RemoteSystemService {
...
@@ -23,6 +23,6 @@ public interface RemoteSystemService {
@GetMapping
(
"/sys/api/listItemByDictCode"
)
@GetMapping
(
"/sys/api/listItemByDictCode"
)
Object
getDictList
(
@RequestParam
(
"dictCode"
)
String
dictCode
);
String
getDictList
(
@RequestParam
(
"dictCode"
)
String
dictCode
);
}
}
src/main/java/com/zzsn/event/mapper/SubjectAdditionMapper.java
浏览文件 @
ce70b2fb
...
@@ -28,4 +28,6 @@ public interface SubjectAdditionMapper extends BaseMapper<SubjectAddition> {
...
@@ -28,4 +28,6 @@ public interface SubjectAdditionMapper extends BaseMapper<SubjectAddition> {
List
<
SubjectAddition
>
pageListBySubjectIdAndType
(
String
subjectId
,
int
type
,
int
offset
,
Integer
pageSize
);
List
<
SubjectAddition
>
pageListBySubjectIdAndType
(
String
subjectId
,
int
type
,
int
offset
,
Integer
pageSize
);
int
count
(
String
subjectId
,
int
type
);
int
count
(
String
subjectId
,
int
type
);
List
<
String
>
getSubjectBindInfoSourceIds
(
@Param
(
"subjectId"
)
String
subjectId
);
}
}
src/main/java/com/zzsn/event/mapper/xml/InfoSourceMainMapper.xml
浏览文件 @
ce70b2fb
...
@@ -75,10 +75,10 @@
...
@@ -75,10 +75,10 @@
WHERE
WHERE
b.id IS NOT NULL
b.id IS NOT NULL
<if
test=
"infoSourceMain.infoAddress!=null and infoSourceMain.infoAddress != ''"
>
<if
test=
"infoSourceMain.infoAddress!=null and infoSourceMain.infoAddress != ''"
>
and a.info
A
ddress like CONCAT('%',#{infoSourceMain.infoAddress},'%')
and a.info
_a
ddress like CONCAT('%',#{infoSourceMain.infoAddress},'%')
</if>
</if>
<if
test=
"infoSourceMain.infoName!=null and infoSourceMain.infoName != ''"
>
<if
test=
"infoSourceMain.infoName!=null and infoSourceMain.infoName != ''"
>
and a.info
N
ame like CONCAT('%',#{infoSourceMain.infoName},'%')
and a.info
_n
ame like CONCAT('%',#{infoSourceMain.infoName},'%')
</if>
</if>
<if
test=
"infoSourceMain.code!=null and infoSourceMain.code != ''"
>
<if
test=
"infoSourceMain.code!=null and infoSourceMain.code != ''"
>
and a.code like CONCAT('%',#{infoSourceMain.code},'%')
and a.code like CONCAT('%',#{infoSourceMain.code},'%')
...
...
src/main/java/com/zzsn/event/mapper/xml/SubjectAdditionMapper.xml
浏览文件 @
ce70b2fb
...
@@ -251,4 +251,131 @@
...
@@ -251,4 +251,131 @@
select count(1) from subject_addition where subject_id=#{subjectId} and addition_type=#{type}
select count(1) from subject_addition where subject_id=#{subjectId} and addition_type=#{type}
</select>
</select>
<select
id=
"getSubjectBindInfoSourceIds"
resultType=
"java.lang.String"
>
SELECT
distinct x.id
FROM
(
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 )
AND sm.subject_id = #{subjectId} UNION
SELECT
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 )
AND sm.subject_id = #{subjectId} UNION
SELECT
iso.id
FROM
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 )
AND sim.subject_id = #{subjectId} 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 )
AND sim.subject_id = #{subjectId} 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 )
AND smm.subject_id = #{subjectId} 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 )
AND smm.subject_id = #{subjectId}
) x
WHERE
1 = 1
AND x.id NOT IN (
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 AND subject_id = #{subjectId} GROUP BY source_id ) 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 = 34
AND sim.subject_id = #{subjectId} UNION
SELECT
sm.source_id
FROM
subject_info_source_map sm
WHERE
type = 3
AND sm.subject_id = #{subjectId} UNION
SELECT
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 = 33
AND sm.subject_id = #{subjectId} 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
AND smm.subject_id = #{subjectId} 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
AND smm.subject_id = #{subjectId}
) y
)
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/zzsn/event/service/impl/ConfigurationMessageService.java
浏览文件 @
ce70b2fb
差异被折叠。
点击展开。
src/main/java/com/zzsn/event/service/impl/InfoSourceMainServiceImpl.java
浏览文件 @
ce70b2fb
...
@@ -167,7 +167,7 @@ public class InfoSourceMainServiceImpl extends ServiceImpl<InfoSourceMainMapper,
...
@@ -167,7 +167,7 @@ public class InfoSourceMainServiceImpl extends ServiceImpl<InfoSourceMainMapper,
return
jsonObject
;
return
jsonObject
;
}
}
private
List
<
SysDictItem
>
getDictList
(
String
dictCode
){
private
List
<
SysDictItem
>
getDictList
(
String
dictCode
){
Object
dictList
=
remoteSystemService
.
getDictList
(
dictCode
);
String
dictList
=
remoteSystemService
.
getDictList
(
dictCode
);
return
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
dictList
),
SysDictItem
.
class
);
return
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
dictList
),
SysDictItem
.
class
);
}
}
}
}
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
ce70b2fb
...
@@ -1021,6 +1021,18 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -1021,6 +1021,18 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
unBindLabels
(
subjectPage
);
unBindLabels
(
subjectPage
);
}
}
//解绑信息源组
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"4"
))
{
unBindInfoSourceMainGroup
(
subjectPage
);
}
//解绑信息源
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"5"
))
{
unBindInfoSourceMain
(
subjectPage
);
}
//解绑标签
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"6"
))
{
unBindLabelsMain
(
subjectPage
);
}
configurationMessageService
.
bindInfoSourceSend
(
subjectPage
.
getId
());
configurationMessageService
.
bindInfoSourceSend
(
subjectPage
.
getId
());
}
}
...
@@ -1091,6 +1103,27 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -1091,6 +1103,27 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
}
}
}
private
void
unBindInfoSourceMainGroup
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
String
>
idList
=
subjectPage
.
getBindIds
();
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//解绑通用信息源组
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
INFO_MAIN_SOURCE_GROUP
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//解绑定向信息源组
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
DIRECTIONA_MAIN_INFO_SOURCE_GROUP
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//解绑屏蔽信息源组
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_MAIN_INFO_SOURCE_GROUP
.
getvalue
());
}
}
private
void
unBindLabels
(
SubjectPage
subjectPage
)
{
private
void
unBindLabels
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
...
@@ -1111,6 +1144,25 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -1111,6 +1144,25 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
unBindLabel
(
subjectPage
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_LABEL
.
getvalue
());
unBindLabel
(
subjectPage
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_LABEL
.
getvalue
());
}
}
}
}
private
void
unBindLabelsMain
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
BindLabelVo
>
bindLabels
=
subjectPage
.
getBindLabels
();
if
(
CollectionUtil
.
isEmpty
(
bindLabels
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//解绑通用标签
unBindLabel
(
subjectPage
,
BindTypeEnum
.
INFO_SOURCE_MAIN_LABEL
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//解绑定向标签
unBindLabel
(
subjectPage
,
BindTypeEnum
.
DIRECTIONA_INFO_MAIN_SOURCE_LABEL
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//解绑屏蔽标签
unBindLabel
(
subjectPage
,
BindTypeEnum
.
EXCLUDE_INFO_MAIN_SOURCE_LABEL
.
getvalue
());
}
}
private
void
unBindLabel
(
SubjectPage
subjectPage
,
Integer
type
)
{
private
void
unBindLabel
(
SubjectPage
subjectPage
,
Integer
type
)
{
List
<
BindLabelVo
>
bindLabels
=
subjectPage
.
getBindLabels
();
List
<
BindLabelVo
>
bindLabels
=
subjectPage
.
getBindLabels
();
...
@@ -1151,6 +1203,25 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -1151,6 +1203,25 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE
.
getvalue
());
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE
.
getvalue
());
}
}
}
}
private
void
unBindInfoSourceMain
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
String
>
idList
=
subjectPage
.
getBindIds
();
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//解绑通用信息源
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
INFO_MAIN_SOURCE
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//解绑定向信息源
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
DIRECTIONA_MAIN_INFO_SOURCE
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//解绑屏蔽信息源
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_MAIN_INFO_SOURCE
.
getvalue
());
}
}
private
void
unbindInfoSource
(
SubjectPage
subjectPage
,
List
<
String
>
idList
,
Integer
bindType
)
{
private
void
unbindInfoSource
(
SubjectPage
subjectPage
,
List
<
String
>
idList
,
Integer
bindType
)
{
iSubjectInfoSourceMapService
.
deleteInfoSourceIds
(
subjectPage
.
getId
(),
idList
,
bindType
);
iSubjectInfoSourceMapService
.
deleteInfoSourceIds
(
subjectPage
.
getId
(),
idList
,
bindType
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论