Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
4a1428ca
提交
4a1428ca
authored
4月 27, 2025
作者:
925993793@qq.com
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/event_fusion' into event_fusion
上级
95995fdb
944f722d
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
90 行增加
和
2 行删除
+90
-2
SubjectManageController.java
...va/com/zzsn/event/controller/SubjectManageController.java
+12
-0
RelationBindController.java
.../zzsn/event/controller/common/RelationBindController.java
+26
-1
InfoSource.java
src/main/java/com/zzsn/event/entity/InfoSource.java
+4
-0
Subject.java
src/main/java/com/zzsn/event/entity/Subject.java
+3
-0
SubjectService.java
src/main/java/com/zzsn/event/service/SubjectService.java
+3
-0
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+41
-0
InfoSourceCondition.java
src/main/java/com/zzsn/event/vo/InfoSourceCondition.java
+1
-1
没有找到文件。
src/main/java/com/zzsn/event/controller/SubjectManageController.java
浏览文件 @
4a1428ca
...
...
@@ -860,6 +860,18 @@ public class SubjectManageController {
List
<
InfoSourceLabelVO
>
bindList
=
clbLabelService
.
bindInfoSourceLabelInfo
(
subjectId
);
return
Result
.
OK
(
bindList
);
}
/**
* 更新subject的数据范围
* @param subjectId 专题id
*/
@GetMapping
(
"/subjectUpdateScope"
)
public
Result
<?>
subjectUpdateScope
(
@RequestParam
(
name
=
"subjectId"
)
String
subjectId
,
@RequestParam
(
name
=
"type"
)
String
type
,
@RequestParam
(
name
=
"scop"
,
defaultValue
=
""
)
String
scop
)
{
Subject
subject
=
subjectService
.
subjectUpdateScope
(
subjectId
,
type
,
scop
);
return
Result
.
OK
(
subject
);
}
/**
* 绑定信息源标签数据
...
...
src/main/java/com/zzsn/event/controller/common/RelationBindController.java
浏览文件 @
4a1428ca
...
...
@@ -7,9 +7,11 @@ import com.alibaba.fastjson2.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.zzsn.event.constant.Result
;
import
com.zzsn.event.entity.InfoSource
;
import
com.zzsn.event.entity.InfoSourceGroup
;
import
com.zzsn.event.entity.Subject
;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.vo.*
;
...
...
@@ -116,7 +118,30 @@ public class RelationBindController {
}
subjectIdList
.
add
(
subjectId
);
}
IPage
<
InfoSourceVo
>
pageList
=
infoSourceService
.
bindInfoSourcePageList
(
infoSourceCondition
,
subjectIdList
,
pageNo
,
pageSize
);
//查询
IPage
<
InfoSourceVo
>
pageList
=
null
;
if
(
CollectionUtil
.
isNotEmpty
(
subjectIdList
)
&&
subjectIdList
.
size
()
==
1
&&
subjectId
.
equals
(
subjectIdList
.
get
(
0
)))
{
Subject
byId
=
subjectService
.
getById
(
subjectId
);
if
(
ObjectUtil
.
isNotNull
(
byId
)
&&
StringUtils
.
isNotEmpty
(
byId
.
getDataScope
())
&&
byId
.
getDataScope
().
contains
(
"1"
))
{
Page
<
InfoSource
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
return
Result
.
OK
(
infoSourceService
.
page
(
page
,
Wrappers
.<
InfoSource
>
lambdaQuery
()
.
eq
(
ObjectUtil
.
isNotNull
(
infoSourceCondition
.
getCrawlType
()),
InfoSource:
:
getCrawlType
,
infoSourceCondition
.
getCrawlType
())
.
eq
(
StrUtil
.
isNotBlank
(
infoSourceCondition
.
getStatus
()),
InfoSource:
:
getStatus
,
infoSourceCondition
.
getStatus
())
.
like
(
StrUtil
.
isNotBlank
(
infoSourceCondition
.
getWebSiteName
()),
InfoSource:
:
getWebSiteName
,
infoSourceCondition
.
getWebSiteName
())
.
like
(
StrUtil
.
isNotBlank
(
infoSourceCondition
.
getSiteName
()),
InfoSource:
:
getSiteName
,
infoSourceCondition
.
getSiteName
())
.
like
(
StrUtil
.
isNotBlank
(
infoSourceCondition
.
getSiteUri
()),
InfoSource:
:
getSiteUri
,
infoSourceCondition
.
getSiteUri
())
.
orderByDesc
(
InfoSource:
:
getCreateTime
)
));
}
else
{
pageList
=
infoSourceService
.
bindInfoSourcePageList
(
infoSourceCondition
,
subjectIdList
,
pageNo
,
pageSize
);
}
}
else
{
pageList
=
infoSourceService
.
bindInfoSourcePageList
(
infoSourceCondition
,
subjectIdList
,
pageNo
,
pageSize
);
}
return
Result
.
OK
(
pageList
);
}
...
...
src/main/java/com/zzsn/event/entity/InfoSource.java
浏览文件 @
4a1428ca
...
...
@@ -69,4 +69,8 @@ public class InfoSource implements Serializable {
/**原创来源(中文逗号隔开)*/
private
String
originalSource
;
/**爬虫类别*/
private
String
crawlType
;
/**爬虫类别*/
private
String
status
;
}
src/main/java/com/zzsn/event/entity/Subject.java
浏览文件 @
4a1428ca
...
...
@@ -114,5 +114,8 @@ public class Subject implements Serializable {
/**专题分类id*/
@TableField
(
exist
=
false
)
private
String
typeId
;
/**数据范围(是否是全库) - 采集库全库-1,企业库全库-2,政策库全库-3*/
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
// 忽略更新策略
private
String
dataScope
;
}
src/main/java/com/zzsn/event/service/SubjectService.java
浏览文件 @
4a1428ca
...
...
@@ -202,4 +202,7 @@ public interface SubjectService extends IService<Subject> {
void
deleteBindNew
(
SubjectPage
subjectPage
);
String
getMinCreateTime
(
List
<
String
>
subjectIdList
);
Subject
subjectUpdateScope
(
String
subjectId
,
String
type
,
String
scop
);
}
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
4a1428ca
...
...
@@ -905,6 +905,47 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
return
baseMapper
.
getMinCreateTime
(
subjectIdList
);
}
@Override
public
Subject
subjectUpdateScope
(
String
subjectId
,
String
type
,
String
scop
)
{
Subject
byId
=
super
.
getById
(
subjectId
);
if
(
ObjectUtil
.
isNotNull
(
byId
)){
String
dataScope
=
byId
.
getDataScope
();
if
(
StrUtil
.
isNotBlank
(
dataScope
)){
List
<
String
>
scopeList
=
CollectionUtil
.
newArrayList
(
dataScope
.
split
(
","
));
if
(
StrUtil
.
equals
(
type
,
"1"
)
&&
"1"
.
equals
(
scop
)){
scopeList
.
add
(
"1"
);
}
else
if
(
StrUtil
.
equals
(
type
,
"1"
)
&&
"0"
.
equals
(
scop
)){
scopeList
.
remove
(
"1"
);
}
if
(
StrUtil
.
equals
(
type
,
"2"
)
&&
"1"
.
equals
(
scop
)){
scopeList
.
add
(
"2"
);
}
else
if
(
StrUtil
.
equals
(
type
,
"2"
)
&&
"0"
.
equals
(
scop
)){
scopeList
.
remove
(
"2"
);
}
if
(
StrUtil
.
equals
(
type
,
"3"
)
&&
"1"
.
equals
(
scop
)){
scopeList
.
add
(
"3"
);
}
else
if
(
StrUtil
.
equals
(
type
,
"3"
)
&&
"0"
.
equals
(
scop
)){
scopeList
.
remove
(
"3"
);
}
if
(
CollectionUtil
.
isNotEmpty
(
scopeList
))
{
scopeList
=
scopeList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
String
join
=
StrUtil
.
join
(
","
,
scopeList
);
byId
.
setDataScope
(
join
);
}
else
{
byId
.
setDataScope
(
null
);
}
this
.
updateById
(
byId
);
}
else
{
if
(
"1"
.
equals
(
scop
))
{
byId
.
setDataScope
(
scop
);
}
this
.
updateById
(
byId
);
}
}
return
byId
;
}
private
void
unBindInfoSourceGroup
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
...
...
src/main/java/com/zzsn/event/vo/InfoSourceCondition.java
浏览文件 @
4a1428ca
...
...
@@ -30,7 +30,7 @@ public class InfoSourceCondition {
/**
* 爬虫类别
*/
private
int
crawlType
;
private
Integer
crawlType
;
/**
* 专题id/事件id-获取专题绑定信息源信息时使用
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论