Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
90934160
提交
90934160
authored
2月 13, 2025
作者:
obcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加通知采集类
上级
65921aa6
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
279 行增加
和
4 行删除
+279
-4
ClbLabelInfoSourceMap.java
...ain/java/com/zzsn/event/entity/ClbLabelInfoSourceMap.java
+95
-0
BindTypeEnum.java
src/main/java/com/zzsn/event/enums/BindTypeEnum.java
+50
-3
ClbLabelInfoSourceMapMapper.java
...va/com/zzsn/event/mapper/ClbLabelInfoSourceMapMapper.java
+16
-0
InfoSourceMapper.java
src/main/java/com/zzsn/event/mapper/InfoSourceMapper.java
+2
-0
KeyWordsMapper.java
src/main/java/com/zzsn/event/mapper/KeyWordsMapper.java
+2
-0
ClbLabelInfoSourceMapMapper.xml
...com/zzsn/event/mapper/xml/ClbLabelInfoSourceMapMapper.xml
+19
-0
InfoSourceMapper.xml
src/main/java/com/zzsn/event/mapper/xml/InfoSourceMapper.xml
+13
-1
KeyWordsMapper.xml
src/main/java/com/zzsn/event/mapper/xml/KeyWordsMapper.xml
+18
-0
ClbLabelInfoSourceMapService.java
.../com/zzsn/event/service/ClbLabelInfoSourceMapService.java
+16
-0
IInfoSourceService.java
src/main/java/com/zzsn/event/service/IInfoSourceService.java
+3
-0
IKeyWordsService.java
src/main/java/com/zzsn/event/service/IKeyWordsService.java
+2
-0
SubjectService.java
src/main/java/com/zzsn/event/service/SubjectService.java
+2
-0
ClbLabelInfoSourceMapServiceImpl.java
.../event/service/impl/ClbLabelInfoSourceMapServiceImpl.java
+22
-0
ConfigurationMessageService.java
.../zzsn/event/service/impl/ConfigurationMessageService.java
+0
-0
InfoSourceServiceImpl.java
...va/com/zzsn/event/service/impl/InfoSourceServiceImpl.java
+6
-0
KeyWordsServiceImpl.java
...java/com/zzsn/event/service/impl/KeyWordsServiceImpl.java
+4
-0
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+9
-0
没有找到文件。
src/main/java/com/zzsn/event/entity/ClbLabelInfoSourceMap.java
0 → 100644
浏览文件 @
90934160
package
com
.
zzsn
.
event
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>
* 信息源和标签关系表
* </p>
*
* @author obcy
* @since 2025-01-03
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"clb_label_info_source_map"
)
public
class
ClbLabelInfoSourceMap
extends
Model
<
ClbLabelInfoSourceMap
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
/**
* 创建人
*/
@TableField
(
"create_by"
)
private
String
createBy
;
/**
* 创建日期
*/
@TableField
(
"create_time"
)
private
Date
createTime
;
/**
* 更新人
*/
@TableField
(
"update_by"
)
private
String
updateBy
;
/**
* 更新日期
*/
@TableField
(
"update_time"
)
private
Date
updateTime
;
/**
* 实体唯一编码
*/
@TableField
(
"entity_code"
)
private
String
entityCode
;
/**
* 标签值唯一编码
*/
@TableField
(
"label_item_code"
)
private
String
labelItemCode
;
/**
* 标签唯一编码
*/
@TableField
(
"label_code"
)
private
String
labelCode
;
/**
* 标签附加属性
*/
@TableField
(
"extra_code"
)
private
String
extraCode
;
/**
* 业务口径(1自定义,2实体数仓表引用,3字典引用)
*/
@TableField
(
"business_caliber"
)
private
Integer
businessCaliber
;
@Override
protected
Serializable
pkVal
()
{
return
this
.
id
;
}
}
src/main/java/com/zzsn/event/enums/BindTypeEnum.java
浏览文件 @
90934160
package
com
.
zzsn
.
event
.
enums
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author zs
* @Description 信息源/信息源组 枚举
...
...
@@ -7,15 +10,21 @@ package com.zzsn.event.enums;
*/
public
enum
BindTypeEnum
{
INFO_SOURCE
(
1
,
"绑定的信息源"
),
INFO_SOURCE_GROUP
(
2
,
"绑定的信息源组"
),
INFO_SOURCE
(
1
,
"绑定的通用信息源"
),
INFO_SOURCE_GROUP
(
2
,
"绑定的通用信息源组"
),
EXCLUDE_INFO_SOURCE
(
3
,
"排除的信息源"
),
EXCLUDE_INFO_SOURCE_GROUP
(
4
,
"排除的信息源组"
),
DIRECTIONA_INFO_SOURCE_GROUP
(
5
,
"定向的信息源组"
);
DIRECTIONA_INFO_SOURCE_GROUP
(
5
,
"定向的信息源组"
),
DIRECTIONA_INFO_SOURCE
(
6
,
"定向的信息源"
),
INFO_SOURCE_LABEL
(
12
,
"通用信息源标签"
),
EXCLUDE_INFO_SOURCE_LABEL
(
14
,
"排除信息源标签"
),
DIRECTIONA_INFO_SOURCE_LABEL
(
15
,
"定向信息源标签"
)
;
private
Integer
value
;
private
String
des
;
...
...
@@ -32,4 +41,42 @@ public enum BindTypeEnum {
public
String
getDes
()
{
return
des
;
}
//定向、通用、屏蔽信息源组类型返回
public
static
List
<
Integer
>
getInfoSourceGroupType
()
{
List
<
Integer
>
values
=
new
ArrayList
<>();
values
.
add
(
BindTypeEnum
.
INFO_SOURCE_GROUP
.
getvalue
());
values
.
add
(
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_GROUP
.
getvalue
());
values
.
add
(
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE_GROUP
.
getvalue
());
return
values
;
}
//定向、通用、屏蔽信息源类型返回
public
static
List
<
Integer
>
getInfoSourceType
()
{
List
<
Integer
>
values
=
new
ArrayList
<>();
values
.
add
(
BindTypeEnum
.
INFO_SOURCE
.
getvalue
());
values
.
add
(
BindTypeEnum
.
EXCLUDE_INFO_SOURCE
.
getvalue
());
values
.
add
(
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE
.
getvalue
());
return
values
;
}
//定向、通用、屏蔽 标签类型返回
public
static
List
<
Integer
>
getInfoSourceLabelType
()
{
List
<
Integer
>
values
=
new
ArrayList
<>();
values
.
add
(
BindTypeEnum
.
INFO_SOURCE_LABEL
.
getvalue
());
values
.
add
(
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_LABEL
.
getvalue
());
values
.
add
(
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE_LABEL
.
getvalue
());
return
values
;
}
public
static
BindTypeEnum
getEnumByValue
(
Integer
value
)
{
for
(
BindTypeEnum
bindTypeEnum
:
BindTypeEnum
.
values
())
{
if
(
bindTypeEnum
.
getvalue
().
equals
(
value
))
{
return
bindTypeEnum
;
}
}
return
null
;
}
}
src/main/java/com/zzsn/event/mapper/ClbLabelInfoSourceMapMapper.java
0 → 100644
浏览文件 @
90934160
package
com
.
zzsn
.
event
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zzsn.event.entity.ClbLabelInfoSourceMap
;
/**
* <p>
* 信息源和标签关系表 Mapper 接口
* </p>
*
* @author obcy
* @since 2025-01-03
*/
public
interface
ClbLabelInfoSourceMapMapper
extends
BaseMapper
<
ClbLabelInfoSourceMap
>
{
}
src/main/java/com/zzsn/event/mapper/InfoSourceMapper.java
浏览文件 @
90934160
...
...
@@ -130,4 +130,6 @@ public interface InfoSourceMapper extends BaseMapper<InfoSource> {
Set
<
String
>
directSourceColumnSet
(
@Param
(
"webSiteNames"
)
List
<
String
>
webSiteNames
);
IPage
<
InfoSourceVo
>
bindSourceIdPageList
(
Page
<
InfoSourceVo
>
page
,
@Param
(
"infoSourceVo"
)
InfoSourceCondition
infoSourceCondition
,
@Param
(
"subjectIds"
)
List
<
String
>
subjectIds
);
List
<
String
>
listIdByGroupIds
(
@Param
(
"groupIds"
)
List
<
String
>
groupIds
);
}
src/main/java/com/zzsn/event/mapper/KeyWordsMapper.java
浏览文件 @
90934160
...
...
@@ -61,4 +61,6 @@ public interface KeyWordsMapper extends BaseMapper<KeyWords> {
List
<
KeyWordsPage
>
pageListByTypeIdList
(
@Param
(
"ids"
)
List
<
String
>
ids
,
@Param
(
"subjectId"
)
String
subjectId
,
@Param
(
"status"
)
int
status
,
@Param
(
"bindingType"
)
String
bindingType
);
Integer
countByTypeAndIdList
(
@Param
(
"finalIdList"
)
List
<
String
>
finalIdList
,
@Param
(
"subjectId"
)
String
subjectId
);
List
<
KeyWordsPage
>
bindKeyWordsListByIdsAndBindType
(
@Param
(
"subjectIds"
)
List
<
String
>
ids
,
@Param
(
"bindingType"
)
String
bindingType
);
}
src/main/java/com/zzsn/event/mapper/xml/ClbLabelInfoSourceMapMapper.xml
0 → 100644
浏览文件 @
90934160
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zzsn.event.mapper.ClbLabelInfoSourceMapMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.zzsn.event.entity.ClbLabelInfoSourceMap"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"entity_code"
property=
"entityCode"
/>
<result
column=
"label_item_code"
property=
"labelItemCode"
/>
<result
column=
"label_code"
property=
"labelCode"
/>
<result
column=
"extra_code"
property=
"extraCode"
/>
<result
column=
"business_caliber"
property=
"businessCaliber"
/>
</resultMap>
</mapper>
src/main/java/com/zzsn/event/mapper/xml/InfoSourceMapper.xml
浏览文件 @
90934160
...
...
@@ -378,4 +378,16 @@
</foreach>
</if>
</select>
</mapper>
<select
id=
"listIdByGroupIds"
resultType=
"java.lang.String"
>
SELECT a.id
from info_source a
INNER JOIN info_source_group_map b ON b.source_id = a.id
where 1=1
<if
test=
"groupIds!=null and groupIds.size()>0"
>
and b.group_id in
<foreach
collection=
"groupIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</select></mapper>
src/main/java/com/zzsn/event/mapper/xml/KeyWordsMapper.xml
浏览文件 @
90934160
...
...
@@ -120,4 +120,22 @@
</foreach>
and a.id not in (select keywords_id from subject_keywords_map where subject_id = #{subjectId})
</select>
<select
id=
"bindKeyWordsListByIdsAndBindType"
resultType=
"com.zzsn.event.vo.KeyWordsPage"
>
SELECT b.*, d.id as keyWordsTypeId, d.type_name as keyWordTypeNames, a.type as type, a.id as subjectKeyWordId,a.binding_type FROM key_words b
LEFT JOIN subject_keywords_map a ON a.keywords_id = b.id
LEFT JOIN keywords_type_map c ON b.id = c.keywords_id
LEFT JOIN keywords_type d ON d.id = c.type_id
where 1=1
<if
test=
"subjectIds != null and subjectIds.size() > 0"
>
and a.subject_id in
<foreach
collection=
"subjectIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"bindingType!=null and bindingType != ''"
>
and a.binding_type = #{bindingType}
</if>
group by b.id
</select>
</mapper>
src/main/java/com/zzsn/event/service/ClbLabelInfoSourceMapService.java
0 → 100644
浏览文件 @
90934160
package
com
.
zzsn
.
event
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.zzsn.event.entity.ClbLabelInfoSourceMap
;
/**
* <p>
* 信息源和标签关系表 服务类
* </p>
*
* @author obcy
* @since 2025-01-03
*/
public
interface
ClbLabelInfoSourceMapService
extends
IService
<
ClbLabelInfoSourceMap
>
{
}
src/main/java/com/zzsn/event/service/IInfoSourceService.java
浏览文件 @
90934160
...
...
@@ -108,4 +108,7 @@ public interface IInfoSourceService extends IService<InfoSource> {
Set
<
String
>
directSourceColumnSet
(
List
<
String
>
webSiteNames
);
IPage
<
InfoSourceVo
>
bindInfoSourcePageList
(
InfoSourceCondition
infoSourceCondition
,
List
<
String
>
subjectIdList
,
Integer
pageNo
,
Integer
pageSize
);
List
<
String
>
listByGroupIds
(
List
<
String
>
groupIds
);
}
src/main/java/com/zzsn/event/service/IKeyWordsService.java
浏览文件 @
90934160
...
...
@@ -7,6 +7,7 @@ import com.zzsn.event.entity.Event;
import
com.zzsn.event.entity.KeyWords
;
import
com.zzsn.event.vo.KeyWordsPage
;
import
com.zzsn.event.vo.KeywordsVO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -87,4 +88,5 @@ public interface IKeyWordsService extends IService<KeyWords> {
Integer
countByTypeAndIdList
(
List
<
String
>
finalIdList
,
String
subjectId
);
List
<
KeyWordsPage
>
bindKeyWordsListByIdsAndBindType
(
List
<
String
>
ids
,
String
bindingType
);
}
src/main/java/com/zzsn/event/service/SubjectService.java
浏览文件 @
90934160
...
...
@@ -160,4 +160,6 @@ public interface SubjectService extends IService<Subject> {
* 发送消息
*/
void
send
(
String
subjectId
,
String
status
);
List
<
KeyWordsPage
>
bindKeyWordsListByIdsAndBindType
(
List
<
String
>
ids
,
String
bindingType
);
}
src/main/java/com/zzsn/event/service/impl/ClbLabelInfoSourceMapServiceImpl.java
0 → 100644
浏览文件 @
90934160
package
com
.
zzsn
.
event
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.zzsn.event.entity.ClbLabelInfoSourceMap
;
import
com.zzsn.event.mapper.ClbLabelInfoSourceMapMapper
;
import
com.zzsn.event.service.ClbLabelInfoSourceMapService
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 信息源和标签关系表 服务实现类
* </p>
*
* @author obcy
* @since 2025-01-03
*/
@Service
public
class
ClbLabelInfoSourceMapServiceImpl
extends
ServiceImpl
<
ClbLabelInfoSourceMapMapper
,
ClbLabelInfoSourceMap
>
implements
ClbLabelInfoSourceMapService
{
}
src/main/java/com/zzsn/event/service/impl/ConfigurationMessageService.java
0 → 100644
浏览文件 @
90934160
差异被折叠。
点击展开。
src/main/java/com/zzsn/event/service/impl/InfoSourceServiceImpl.java
浏览文件 @
90934160
...
...
@@ -215,4 +215,10 @@ public class InfoSourceServiceImpl extends ServiceImpl<InfoSourceMapper, InfoSou
}
return
pageList
;
}
@Override
public
List
<
String
>
listByGroupIds
(
List
<
String
>
groupIds
)
{
return
baseMapper
.
listIdByGroupIds
(
groupIds
);
}
}
src/main/java/com/zzsn/event/service/impl/KeyWordsServiceImpl.java
浏览文件 @
90934160
...
...
@@ -271,4 +271,8 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i
keywordsTypeMap
.
setSysOrgCode
(
keyWords
.
getSysOrgCode
());
keywordsTypeMapService
.
save
(
keywordsTypeMap
);
}
@Override
public
List
<
KeyWordsPage
>
bindKeyWordsListByIdsAndBindType
(
List
<
String
>
ids
,
String
bindingType
)
{
return
baseMapper
.
bindKeyWordsListByIdsAndBindType
(
ids
,
bindingType
);
}
}
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
90934160
...
...
@@ -88,6 +88,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
private
IAlgorithmModelService
modelService
;
@Autowired
private
ClbModelArrangeSubjectMapService
clbModelArrangeSubjectMapService
;
@Autowired
private
IKeyWordsService
iKeyWordsService
;
@Value
(
"${python.subjectProcessorUrl}"
)
...
...
@@ -688,5 +690,12 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
}
}
@Override
public
List
<
KeyWordsPage
>
bindKeyWordsListByIdsAndBindType
(
List
<
String
>
ids
,
String
bindingType
)
{
return
iKeyWordsService
.
bindKeyWordsListByIdsAndBindType
(
ids
,
bindingType
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论