Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
d27fa86d
提交
d27fa86d
authored
4月 27, 2025
作者:
obcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【修改专题数据范围接口,修改绑定信息源查询接口】
上级
5cc7774b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
85 行增加
和
1 行删除
+85
-1
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
+2
-0
SubjectService.java
src/main/java/com/zzsn/event/service/SubjectService.java
+3
-0
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+38
-0
没有找到文件。
src/main/java/com/zzsn/event/controller/SubjectManageController.java
浏览文件 @
d27fa86d
...
@@ -860,6 +860,18 @@ public class SubjectManageController {
...
@@ -860,6 +860,18 @@ public class SubjectManageController {
List
<
InfoSourceLabelVO
>
bindList
=
clbLabelService
.
bindInfoSourceLabelInfo
(
subjectId
);
List
<
InfoSourceLabelVO
>
bindList
=
clbLabelService
.
bindInfoSourceLabelInfo
(
subjectId
);
return
Result
.
OK
(
bindList
);
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
浏览文件 @
d27fa86d
...
@@ -7,9 +7,11 @@ import com.alibaba.fastjson2.JSONObject;
...
@@ -7,9 +7,11 @@ import com.alibaba.fastjson2.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
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.constant.Result
;
import
com.zzsn.event.entity.InfoSource
;
import
com.zzsn.event.entity.InfoSource
;
import
com.zzsn.event.entity.InfoSourceGroup
;
import
com.zzsn.event.entity.InfoSourceGroup
;
import
com.zzsn.event.entity.Subject
;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.vo.*
;
import
com.zzsn.event.vo.*
;
...
@@ -116,7 +118,30 @@ public class RelationBindController {
...
@@ -116,7 +118,30 @@ public class RelationBindController {
}
}
subjectIdList
.
add
(
subjectId
);
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
);
return
Result
.
OK
(
pageList
);
}
}
...
...
src/main/java/com/zzsn/event/entity/InfoSource.java
浏览文件 @
d27fa86d
...
@@ -69,4 +69,8 @@ public class InfoSource implements Serializable {
...
@@ -69,4 +69,8 @@ public class InfoSource implements Serializable {
/**原创来源(中文逗号隔开)*/
/**原创来源(中文逗号隔开)*/
private
String
originalSource
;
private
String
originalSource
;
/**爬虫类别*/
private
String
crawlType
;
/**爬虫类别*/
private
String
status
;
}
}
src/main/java/com/zzsn/event/entity/Subject.java
浏览文件 @
d27fa86d
...
@@ -114,5 +114,7 @@ public class Subject implements Serializable {
...
@@ -114,5 +114,7 @@ public class Subject implements Serializable {
/**专题分类id*/
/**专题分类id*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
typeId
;
private
String
typeId
;
/**数据范围(是否是全库) - 采集库全库-1,企业库全库-2,政策库全库-3*/
private
String
dataScope
;
}
}
src/main/java/com/zzsn/event/service/SubjectService.java
浏览文件 @
d27fa86d
...
@@ -202,4 +202,7 @@ public interface SubjectService extends IService<Subject> {
...
@@ -202,4 +202,7 @@ public interface SubjectService extends IService<Subject> {
void
deleteBindNew
(
SubjectPage
subjectPage
);
void
deleteBindNew
(
SubjectPage
subjectPage
);
String
getMinCreateTime
(
List
<
String
>
subjectIdList
);
String
getMinCreateTime
(
List
<
String
>
subjectIdList
);
Subject
subjectUpdateScope
(
String
subjectId
,
String
type
,
String
scop
);
}
}
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
d27fa86d
...
@@ -905,6 +905,44 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
...
@@ -905,6 +905,44 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
return
baseMapper
.
getMinCreateTime
(
subjectIdList
);
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
=
Arrays
.
asList
(
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"
);
}
scopeList
=
scopeList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
String
join
=
StrUtil
.
join
(
","
,
scopeList
);
byId
.
setDataScope
(
join
);
this
.
updateById
(
byId
);
}
else
{
if
(
"1"
.
equals
(
scop
))
{
byId
.
setDataScope
(
scop
);
}
this
.
updateById
(
byId
);
}
}
return
byId
;
}
private
void
unBindInfoSourceGroup
(
SubjectPage
subjectPage
)
{
private
void
unBindInfoSourceGroup
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论