Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
085741a0
提交
085741a0
authored
2月 18, 2025
作者:
obcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【添加绑定解绑信息源接口】
上级
8c6cc457
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
98 行增加
和
1 行删除
+98
-1
SubjectManageController.java
...va/com/zzsn/event/controller/SubjectManageController.java
+5
-1
RelationBindController.java
.../zzsn/event/controller/common/RelationBindController.java
+48
-0
ISubjectInfoSourceMapService.java
.../com/zzsn/event/service/ISubjectInfoSourceMapService.java
+5
-0
SubjectService.java
src/main/java/com/zzsn/event/service/SubjectService.java
+4
-0
SubjectInfoSourceMapServiceImpl.java
...n/event/service/impl/SubjectInfoSourceMapServiceImpl.java
+5
-0
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+0
-0
BindLabelVo.java
src/main/java/com/zzsn/event/vo/BindLabelVo.java
+15
-0
SubjectPage.java
src/main/java/com/zzsn/event/vo/SubjectPage.java
+16
-0
没有找到文件。
src/main/java/com/zzsn/event/controller/SubjectManageController.java
浏览文件 @
085741a0
...
...
@@ -14,6 +14,7 @@ import com.zzsn.event.entity.*;
import
com.zzsn.event.es.EsService
;
import
com.zzsn.event.feign.api.RemoteModelService
;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.service.impl.ConfigurationMessageService
;
import
com.zzsn.event.util.*
;
import
com.zzsn.event.util.user.UserUtil
;
import
com.zzsn.event.util.user.UserVo
;
...
...
@@ -97,7 +98,8 @@ public class SubjectManageController {
private
PythonUtil
pythonUtil
;
@Autowired
(
required
=
false
)
private
RemoteModelService
remoteModelService
;
@Autowired
private
ConfigurationMessageService
configurationMessageService
;
@Value
(
"${kafka.topic.subject.run:}"
)
private
String
SUBJECT_MODEL_KAFKA_CHANNEL
;
...
...
@@ -435,6 +437,8 @@ public class SubjectManageController {
@GetMapping
(
value
=
"/bindKeyWordsList"
)
public
Result
<?>
bindKeyWordsList
(
@RequestParam
(
name
=
"id"
)
String
id
,
@RequestParam
(
name
=
"bindingType"
,
required
=
false
)
String
bindingType
)
{
List
<
KeyWordsPage
>
bindKeyWordsList
=
subjectKeywordsMapService
.
bindKeyWordsList
(
id
,
bindingType
);
//同步配置到采集
configurationMessageService
.
bindKeyWordsSend
(
id
);
return
Result
.
OK
(
bindKeyWordsList
);
}
...
...
src/main/java/com/zzsn/event/controller/common/RelationBindController.java
浏览文件 @
085741a0
package
com
.
zzsn
.
event
.
controller
.
common
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson2.JSONObject
;
...
...
@@ -12,6 +13,7 @@ import com.zzsn.event.entity.InfoSourceGroup;
import
com.zzsn.event.service.*
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.vo.*
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -43,6 +45,8 @@ public class RelationBindController {
private
CommonService
commonService
;
@Autowired
private
InfoSourceGroupService
infoSourceGroupService
;
@Autowired
private
SubjectService
subjectService
;
/**
* 项目列表
...
...
@@ -149,6 +153,18 @@ public class RelationBindController {
}
/**
* 专题信息源绑定新
*
* @param subjectPage
* @return
*/
@ApiOperation
(
value
=
"专题信息源绑定"
,
notes
=
"专题信息源绑定"
)
@PostMapping
(
value
=
"/infoSourceBindNew"
)
public
Result
<?>
infoSourceBindNew
(
@RequestBody
SubjectPage
subjectPage
)
{
return
subjectService
.
infoSourceBindNew
(
subjectPage
);
}
/**
* 专题/事件信息源绑定删除(专题/事件配置页)
*
* @param subjectPage 参数
...
...
@@ -161,6 +177,38 @@ public class RelationBindController {
}
/**
* 专题信息源绑定删除
*
* @param subjectPage
* @return
*/
@ApiOperation
(
value
=
"专题信息源绑定删除"
,
notes
=
"专题信息源绑定删除"
)
@PostMapping
(
value
=
"/deleteBindInfoSourceNew"
)
public
Result
<?>
deleteBindInfoSourceNew
(
@RequestBody
SubjectPage
subjectPage
)
{
String
subjectId
=
subjectPage
.
getId
();
List
<
String
>
bindIds
=
subjectPage
.
getBindIds
();
if
(
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
subjectId
))
{
return
Result
.
FAIL
(
"专题id不能为空"
);
}
if
(
StrUtil
.
isBlank
(
subjectPage
.
getSourceBindType
())){
return
Result
.
FAIL
(
"解绑类型不能为空"
);
}
if
(
StrUtil
.
isBlank
(
subjectPage
.
getSourceType
())){
return
Result
.
FAIL
(
"信息源类型不能为空"
);
}
if
(
CollectionUtil
.
isEmpty
(
bindIds
)
&&
(
"1"
.
equals
(
subjectPage
.
getSourceType
())
||
"2"
.
equals
(
subjectPage
.
getSourceType
()))){
return
Result
.
FAIL
(
"解绑绑定id不能为空"
);
}
if
(
CollectionUtil
.
isEmpty
(
subjectPage
.
getBindLabels
())
&&
"3"
.
equals
(
subjectPage
.
getSourceType
()
)){
return
Result
.
FAIL
(
"解绑标签不能为空"
);
}
subjectService
.
deleteBindNew
(
subjectPage
);
return
Result
.
OK
(
"删除成功!"
);
}
/**
* 专题/事件绑定的信息源组列表(专题/事件配置页)
*
* @param subjectId 专题/事件id
...
...
src/main/java/com/zzsn/event/service/ISubjectInfoSourceMapService.java
浏览文件 @
085741a0
...
...
@@ -82,4 +82,9 @@ public interface ISubjectInfoSourceMapService extends IService<SubjectInfoSource
* @date 2024/5/6
*/
List
<
SubjectStatisticsVo
>
subjectRealBindInfoSources
(
List
<
String
>
subjectIds
);
/**
* 根据批量删除
*/
void
deleteInfoSourceIds
(
String
subjectId
,
List
<
String
>
infoSourceIds
,
Integer
type
);
}
src/main/java/com/zzsn/event/service/SubjectService.java
浏览文件 @
085741a0
...
...
@@ -162,4 +162,8 @@ public interface SubjectService extends IService<Subject> {
void
send
(
String
subjectId
,
String
status
);
List
<
KeyWordsPage
>
bindKeyWordsListByIdsAndBindType
(
List
<
String
>
ids
,
String
bindingType
);
Result
<?>
infoSourceBindNew
(
SubjectPage
subjectPage
);
void
deleteBindNew
(
SubjectPage
subjectPage
);
}
src/main/java/com/zzsn/event/service/impl/SubjectInfoSourceMapServiceImpl.java
浏览文件 @
085741a0
...
...
@@ -63,6 +63,11 @@ public class SubjectInfoSourceMapServiceImpl extends ServiceImpl<SubjectInfoSour
}
@Override
public
void
deleteInfoSourceIds
(
String
subjectId
,
List
<
String
>
infoSourceIds
,
Integer
type
)
{
baseMapper
.
deleteInfoSourceIds
(
subjectId
,
infoSourceIds
,
type
);
}
@Override
public
List
<
String
>
subjectRealBindInfoSourceList
(
List
<
String
>
subjectIds
)
{
return
baseMapper
.
subjectRealBindInfoSourceList
(
subjectIds
);
}
...
...
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
085741a0
差异被折叠。
点击展开。
src/main/java/com/zzsn/event/vo/BindLabelVo.java
0 → 100644
浏览文件 @
085741a0
package
com
.
zzsn
.
event
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
BindLabelVo
{
private
String
labelCode
;
private
String
labelItemCode
;
private
List
<
BindLabelVo
>
labelItems
;
}
src/main/java/com/zzsn/event/vo/SubjectPage.java
浏览文件 @
085741a0
...
...
@@ -159,6 +159,22 @@ public class SubjectPage {
/**预估状态*/
private
String
estimateStatus
;
/**
* 信息源绑定-新
* */
//id(可以是信息源组id集合,可以是信息源id集合)
private
List
<
String
>
bindIds
;
//信息源标签
private
List
<
BindLabelVo
>
bindLabels
;
//绑定类型类型(1:通用 2:定向 3:屏蔽)
private
String
sourceBindType
;
//信息源类型(1:信息源组 2:信息源 3:标签)
private
String
sourceType
;
/**
* 信息源绑定-新end
* */
private
List
<
ClbModelArrange
>
clbModelArranges
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论