Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
5d423e75
提交
5d423e75
authored
3月 10, 2025
作者:
obcy
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/event_fusion' into event_fusion
上级
771102fa
deb05fc3
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
148 行增加
和
95 行删除
+148
-95
env.prod
build/env/env.prod
+7
-2
env.test
build/env/env.test
+7
-2
run.sh
build/run.sh
+24
-18
SubjectManageController.java
...va/com/zzsn/event/controller/SubjectManageController.java
+0
-4
SubjectSimpleController.java
...va/com/zzsn/event/controller/SubjectSimpleController.java
+16
-0
EsService.java
src/main/java/com/zzsn/event/es/EsService.java
+1
-3
SubjectMapper.xml
src/main/java/com/zzsn/event/mapper/xml/SubjectMapper.xml
+1
-0
SubjectTypeMapper.xml
...main/java/com/zzsn/event/mapper/xml/SubjectTypeMapper.xml
+3
-4
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+71
-59
InfoDataSearchCondition.java
src/main/java/com/zzsn/event/vo/InfoDataSearchCondition.java
+1
-1
SubjectDetailVO.java
src/main/java/com/zzsn/event/vo/SubjectDetailVO.java
+2
-0
application-dev.yml
src/main/resources/application-dev.yml
+13
-0
application-nacos.yml
src/main/resources/application-nacos.yml
+2
-2
没有找到文件。
build/env/env.prod
浏览文件 @
5d423e75
...
...
@@ -27,4 +27,9 @@ svc_port="1689"
# nacos配置
nacos_server="192.168.0.224:8848"
nacos_username="nacos"
nacos_password="nacos"
\ No newline at end of file
nacos_password="nacos"
# 资源限制
## cpu
limit_cpu=2.0
limit_mem=2g
\ No newline at end of file
build/env/env.test
浏览文件 @
5d423e75
...
...
@@ -27,4 +27,9 @@ svc_port="1689"
# nacos配置
nacos_server
=
"192.168.0.225:8848"
nacos_username
=
"nacos"
nacos_password
=
"nacos"
\ No newline at end of file
nacos_password
=
"nacos"
# 资源限制
## cpu
limit_cpu
=
2.0
limit_mem
=
2
g
\ No newline at end of file
build/run.sh
浏览文件 @
5d423e75
...
...
@@ -22,6 +22,7 @@ function print_usage {
function
handle
{
local
env_name
=
$1
local
build_timestamp
=
$2
local
local_ip
=
$3
echo
"执行的环境变量:
${
env_name
}
"
echo
"执行的构建时间戳:
${
build_timestamp
}
"
...
...
@@ -36,38 +37,43 @@ function handle {
local
version
=
${
version
}
-
${
build_timestamp
}
echo
"---运行容器:
${
name
}
:
${
version
}
---"
docker login
-u
=
${
repo_username
}
-p
=
${
repo_passwd
}
${
domain
}
docker pull
${
domain
}
/
${
namespace
}
/
${
name
}
:
${
version
}
# 构建 JSON 数据
json_data
=
"{
\
\"
container_name
\"
:
\"
$name
\"
,
\
\"
image_version
\"
:
\"
$domain
/
$namespace
/
$name
:
$version
\"
,
\
\"
ports
\"
: [
\"
$svc_port
:
$svc_port
\"
],
\
\"
mount_infos
\"
: [
\"
/etc/localtime:/etc/localtime:ro
\"
,
\"
$dir
/logs:
$svc_logs
\"
],
\
\"
cpu_count
\"
:
$limit_cpu
,
\
\"
memory_limit
\"
:
\"
$limit_mem
\"
,
\
\"
ulimit
\"
:
\"
nofile=65535:65535
\"
\
}"
if
[
"
$(
docker ps
-aqf
"name=^
${
name
}
"
)
"
]
;
then
# 如果存在,则停止并删除容器
echo
"停止并删除容器:
${
name
}
"
docker rm
-f
"
${
name
}
"
# 执行 curl 请求,并将响应结果存储在 response 变量中
response
=
$(
curl
-s
-X
POST
-H
"Content-Type: application/json"
-H
"X-API-Key: uOyKfp20pdM3MFhr3KAQBoe1UHCaZLUeeLephB57MPvGXTY05Eis5eaxta6fEtpa"
-d
"
$json_data
"
"http://
$local_ip
:10080/start-container"
)
echo
"响应结果:
${
response
}
"
# 检查响应中是否包含 "succeed"
if
echo
"
$response
"
|
grep
-q
"successfully"
;
then
echo
"部署成功"
exit
0
else
echo
"容器不存在直接运行:
${
name
}
"
echo
"部署失败"
exit
1
fi
docker run
--restart
always
-d
-p
${
svc_port
}
:
${
svc_port
}
--name
${
name
}
\
-v
/etc/localtime:/etc/localtime:ro
\
-v
${
dir
}
/logs:
${
svc_logs
}
\
${
domain
}
/
${
namespace
}
/
${
name
}
:
${
version
}
echo
"---清理none镜像---"
docker image prune
-af
}
# 主程序入口点
function
main
{
if
[
"$#"
-ne
2
]
;
then
if
[
"$#"
-ne
3
]
;
then
print_usage
echo
"错误: 需要提供
两个个参数 <env_name> <build_timestamp>"
>
&2
echo
"错误: 需要提供
三个参数 <env_name> <build_timestamp> <local_ip>"
>
&2
exit
1
fi
local
env_name
=
$1
local
build_timestamp
=
$2
local
local_ip
=
$3
handle
"
${
env_name
}
"
"
${
build_timestamp
}
"
handle
"
${
env_name
}
"
"
${
build_timestamp
}
"
"
${
local_ip
}
"
}
# 错误处理
...
...
src/main/java/com/zzsn/event/controller/SubjectManageController.java
浏览文件 @
5d423e75
...
...
@@ -99,8 +99,6 @@ 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
;
...
...
@@ -455,8 +453,6 @@ 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/SubjectSimpleController.java
浏览文件 @
5d423e75
...
...
@@ -109,6 +109,22 @@ public class SubjectSimpleController {
return
Result
.
OK
(
subjectDetailVO
);
}
/**
* 专题详情(无验证版本)
*
* @param subjectId 专题id
* @author lkg
* @date 2025/1/9
*/
@GetMapping
(
"/queryInfoNoSign"
)
public
Result
<?>
queryInfoNoSign
(
@RequestParam
String
subjectId
){
SubjectDetailVO
subjectDetailVO
=
subjectSimpleService
.
queryInfo
(
subjectId
);
return
Result
.
OK
(
subjectDetailVO
);
}
/**
* 删除专题
*
...
...
src/main/java/com/zzsn/event/es/EsService.java
浏览文件 @
5d423e75
...
...
@@ -650,9 +650,7 @@ public class EsService {
}
//装配信息源的条件
if
(
CollectionUtils
.
isNotEmpty
(
infoSourceIdList
))
{
BoolQueryBuilder
childQuery
=
QueryBuilders
.
boolQuery
();
childQuery
.
should
(
QueryBuilders
.
termsQuery
(
"sid"
,
infoSourceIdList
));
boolQuery
.
must
(
childQuery
);
boolQuery
.
must
(
QueryBuilders
.
termsQuery
(
"sid"
,
infoSourceIdList
.
stream
().
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
())));
}
else
{
return
new
Page
<>();
}
...
...
src/main/java/com/zzsn/event/mapper/xml/SubjectMapper.xml
浏览文件 @
5d423e75
...
...
@@ -176,6 +176,7 @@
s.data_source,
s.face_public,
s.library,
s.estimate_status,
s.first_open_time,
c.id as subjectTypeId,
c.type_name as subjectTypeName,
...
...
src/main/java/com/zzsn/event/mapper/xml/SubjectTypeMapper.xml
浏览文件 @
5d423e75
...
...
@@ -36,13 +36,13 @@
SELECT s.id,s.subject_name as name,m.type_id as pid,'0' as subjectCount,s.create_time,'true' as ynSubject
FROM subject s
inner join `subject_type_map` m on s.id = m.subject_id
order by s.
create_time
order by s.
sort_order,s.create_time desc
</select>
<select
id=
"typeBindEventList"
resultType=
"com.zzsn.event.vo.SubjectTypeTreeVO"
>
SELECT s.id,s.event_name as name,m.type_id as pid,'0' as subjectCount,s.create_time,'true' as ynSubject
FROM event s
inner join `subject_type_map` m on s.id = m.subject_id
order by s.
create_time
order by s.
sort_order,s.create_time desc
</select>
<select
id=
"subjectsByFacePublic"
resultType=
"com.zzsn.event.vo.SubjectTreeVO"
>
...
...
@@ -204,4 +204,4 @@
) x
order by x.create_time desc
</select>
</mapper>
\ No newline at end of file
</mapper>
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
5d423e75
...
...
@@ -147,7 +147,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
//查询绑定的流程
List
<
ClbModelArrange
>
clbModelArranges
=
clbModelArrangeService
.
listBySubjectIds
(
idList
);
if
(
CollectionUtil
.
isNotEmpty
(
clbModelArranges
)){
if
(
CollectionUtil
.
isNotEmpty
(
clbModelArranges
))
{
clbModelArranges
.
forEach
(
e
->
e
.
setType
(
SourceTypeEnum
.
getValueNameByValue
(
e
.
getType
())));
Map
<
String
,
List
<
ClbModelArrange
>>
collect
=
clbModelArranges
.
stream
().
collect
(
Collectors
.
groupingBy
(
ClbModelArrange:
:
getSubjectId
));
records
.
forEach
(
e
->
{
...
...
@@ -180,9 +180,9 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
@Override
public
Page
<
Node
>
visiblePageList
(
String
username
,
Integer
type
,
String
subjectName
,
Integer
pageNo
,
Integer
pageSize
)
{
public
Page
<
Node
>
visiblePageList
(
String
username
,
Integer
type
,
String
subjectName
,
Integer
pageNo
,
Integer
pageSize
)
{
Page
<
String
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
return
baseMapper
.
visibleList
(
username
,
type
,
subjectName
,
page
);
return
baseMapper
.
visibleList
(
username
,
type
,
subjectName
,
page
);
}
@Override
...
...
@@ -244,11 +244,11 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
updateWrapper
.
set
(
Subject:
:
getFirstOpenTime
,
new
Date
());
updateWrapper
.
set
(
Subject:
:
getEstimateStatus
,
"预估中"
);
//第一次启用时,添加redis缓存,,用于向专题里进数据
if
(
byId
.
getSubjectType
()
==
3
)
{
if
(
byId
.
getSubjectType
()
==
3
)
{
//复合专题根据绑定的专题数据时间确定要入库的数据时间范围
List
<
String
>
ids
=
this
.
baseMapper
.
getBindSubjectIds
(
byId
.
getId
());
informationService
.
supplyByCondition
(
subjectId
,
ids
);
}
else
{
}
else
{
setRedisCache
(
subjectId
);
}
}
...
...
@@ -374,6 +374,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
@Override
@Transactional
public
void
keyWordsBind
(
SubjectPage
subjectPage
)
{
List
<
String
>
idList
=
subjectPage
.
getKeyWordsIds
();
List
<
SubjectKeywordsMap
>
mapList
=
new
ArrayList
<>();
...
...
@@ -393,18 +394,21 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
@Override
@Transactional
public
void
deleteBindKeyWords
(
SubjectPage
subjectPage
)
{
List
<
String
>
deleteKeyWordsIds
=
subjectPage
.
getKeyWordsIds
();
if
(
deleteKeyWordsIds
!=
null
&&
!
deleteKeyWordsIds
.
isEmpty
())
{
if
(
CollectionUtils
.
isNotEmpty
(
deleteKeyWordsIds
))
{
String
subjectId
=
subjectPage
.
getId
();
subjectKeywordsMapService
.
remove
(
Wrappers
.<
SubjectKeywordsMap
>
lambdaQuery
()
.
eq
(
SubjectKeywordsMap:
:
getSubjectId
,
subjectPage
.
getId
()).
in
(
SubjectKeywordsMap:
:
getKeywordsId
,
deleteKeyWordsIds
)
.
eq
(
StrUtil
.
isNotBlank
(
subjectPage
.
getBindingType
()),
SubjectKeywordsMap:
:
getBindingType
,
subjectPage
.
getBindingType
())
.
eq
(
SubjectKeywordsMap:
:
getSubjectId
,
subjectId
)
.
in
(
SubjectKeywordsMap:
:
getKeywordsId
,
deleteKeyWordsIds
)
.
eq
(
SubjectKeywordsMap:
:
getBindingType
,
subjectPage
.
getBindingType
())
);
//清除redis里面的绑定关系(包括专题信息,以及搜索引擎)
for
(
String
keyWordsId
:
deleteKeyWordsIds
)
{
/*
for (String keyWordsId : deleteKeyWordsIds) {
KeyWordsPage keyWordsPage = keyWordsService.getKeyWordsById(keyWordsId);
redisUtil.del(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWordsPage.getWordsCode());
}
}
*/
}
//同步配置到采集
configurationMessageService
.
bindKeyWordsSend
(
subjectPage
.
getId
());
...
...
@@ -736,7 +740,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
@Override
public
List
<
KeyWordsPage
>
bindKeyWordsListByIdsAndBindType
(
List
<
String
>
ids
,
String
bindingType
)
{
return
iKeyWordsService
.
bindKeyWordsListByIdsAndBindType
(
ids
,
bindingType
);
return
iKeyWordsService
.
bindKeyWordsListByIdsAndBindType
(
ids
,
bindingType
);
}
...
...
@@ -748,28 +752,28 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
if
(
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
subjectId
))
{
return
Result
.
FAIL
(
"专题id不能为空"
);
}
if
(
StrUtil
.
isBlank
(
subjectPage
.
getSourceBindType
())){
if
(
StrUtil
.
isBlank
(
subjectPage
.
getSourceBindType
()))
{
return
Result
.
FAIL
(
"解绑类型不能为空"
);
}
if
(
StrUtil
.
isBlank
(
subjectPage
.
getSourceType
())){
if
(
StrUtil
.
isBlank
(
subjectPage
.
getSourceType
()))
{
return
Result
.
FAIL
(
"信息源类型不能为空"
);
}
if
(
CollectionUtil
.
isEmpty
(
bindIds
)
&&
(
"1"
.
equals
(
subjectPage
.
getSourceType
())
||
"2"
.
equals
(
subjectPage
.
getSourceType
())))
{
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
()
))
{
if
(
CollectionUtil
.
isEmpty
(
subjectPage
.
getBindLabels
())
&&
"3"
.
equals
(
subjectPage
.
getSourceType
()))
{
return
Result
.
FAIL
(
"解绑标签不能为空"
);
}
//绑定信息源组
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"1"
))
{
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"1"
))
{
bindInfoSourceGroup
(
subjectPage
);
}
//绑定信息源
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"2"
))
{
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"2"
))
{
bindInfoSource
(
subjectPage
);
}
//绑定标签
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"3"
))
{
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"3"
))
{
bindLabels
(
subjectPage
);
}
configurationMessageService
.
bindInfoSourceSend
(
subjectId
);
...
...
@@ -783,64 +787,67 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
public
void
deleteBindNew
(
SubjectPage
subjectPage
)
{
//解绑信息源组
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"1"
))
{
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"1"
))
{
unBindInfoSourceGroup
(
subjectPage
);
}
//解绑信息源
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"2"
))
{
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"2"
))
{
unBindInfoSource
(
subjectPage
);
}
//解绑标签
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"3"
))
{
if
(
StrUtil
.
equals
(
subjectPage
.
getSourceType
(),
"3"
))
{
unBindLabels
(
subjectPage
);
}
configurationMessageService
.
bindInfoSourceSend
(
subjectPage
.
getId
());
}
private
void
unBindInfoSourceGroup
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
String
>
idList
=
subjectPage
.
getBindIds
();
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//解绑通用信息源组
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
INFO_SOURCE_GROUP
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//解绑定向信息源组
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE_GROUP
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//解绑屏蔽信息源组
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_GROUP
.
getvalue
());
}
}
private
void
unBindLabels
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
BindLabelVo
>
bindLabels
=
subjectPage
.
getBindLabels
();
if
(
CollectionUtil
.
isEmpty
(
bindLabels
))
{
return
;
if
(
CollectionUtil
.
isEmpty
(
bindLabels
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//解绑通用标签
unBindLabel
(
subjectPage
,
BindTypeEnum
.
INFO_SOURCE_LABEL
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//解绑定向标签
unBindLabel
(
subjectPage
,
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE_LABEL
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//解绑屏蔽标签
unBindLabel
(
subjectPage
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_LABEL
.
getvalue
());
}
}
private
void
unBindLabel
(
SubjectPage
subjectPage
,
Integer
type
)
{
List
<
BindLabelVo
>
bindLabels
=
subjectPage
.
getBindLabels
();
if
(
CollectionUtil
.
isEmpty
(
bindLabels
))
{
return
;
if
(
CollectionUtil
.
isEmpty
(
bindLabels
))
{
return
;
}
Set
<
String
>
labelCode
=
new
HashSet
<>();
Set
<
String
>
labelItemCode
=
new
HashSet
<>();
...
...
@@ -851,30 +858,32 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
iSubjectInfoSourceMapService
.
remove
(
Wrappers
.<
SubjectInfoSourceMap
>
lambdaQuery
()
.
in
(
SubjectInfoSourceMap:
:
getSourceId
,
labelCode
)
.
in
(
SubjectInfoSourceMap:
:
getSourceItemId
,
labelItemCode
)
.
eq
(
SubjectInfoSourceMap:
:
getSubjectId
,
subjectPage
.
getId
())
.
eq
(
SubjectInfoSourceMap:
:
getType
,
type
));
.
in
(
SubjectInfoSourceMap:
:
getSourceId
,
labelCode
)
.
in
(
SubjectInfoSourceMap:
:
getSourceItemId
,
labelItemCode
)
.
eq
(
SubjectInfoSourceMap:
:
getSubjectId
,
subjectPage
.
getId
())
.
eq
(
SubjectInfoSourceMap:
:
getType
,
type
));
}
private
void
unBindInfoSource
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
String
>
idList
=
subjectPage
.
getBindIds
();
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//解绑通用信息源
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
INFO_SOURCE
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//解绑定向信息源
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//解绑屏蔽信息源
unbindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE
.
getvalue
());
}
}
private
void
unbindInfoSource
(
SubjectPage
subjectPage
,
List
<
String
>
idList
,
Integer
bindType
)
{
iSubjectInfoSourceMapService
.
deleteInfoSourceIds
(
subjectPage
.
getId
(),
idList
,
bindType
);
...
...
@@ -900,7 +909,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
scoreModel
.
setData
(
jsonArray
.
toJSONString
());
scoreModel
.
setChangeType
(
0
);
//去除完之后,更新进去
scoreModelService
.
addOrUpdate
(
scoreModel
,
subjectPage
.
getCategory
());
scoreModelService
.
addOrUpdate
(
scoreModel
,
subjectPage
.
getCategory
());
}
}
}
...
...
@@ -910,23 +919,24 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
private
void
bindInfoSourceGroup
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
String
>
idList
=
subjectPage
.
getBindIds
();
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//绑定通用信息源组
bindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
INFO_SOURCE_GROUP
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//绑定定向信息源组
bindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE_GROUP
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//绑定屏蔽信息源组
bindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_GROUP
.
getvalue
());
}
}
private
void
bindInfoSource
(
SubjectPage
subjectPage
,
List
<
String
>
idList
,
Integer
type
)
{
List
<
SubjectInfoSourceMap
>
mapList
=
new
ArrayList
<>();
for
(
String
infoSourceId
:
idList
)
{
...
...
@@ -980,7 +990,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
scoreModelVo
.
setData
(
jsonArray
.
toJSONString
());
scoreModelVo
.
setChangeType
(
0
);
//增加完之后,更新进去
scoreModelService
.
addOrUpdate
(
scoreModelVo
,
subjectPage
.
getCategory
());
scoreModelService
.
addOrUpdate
(
scoreModelVo
,
subjectPage
.
getCategory
());
}
}
iSubjectInfoSourceMapService
.
saveBatch
(
mapList
);
...
...
@@ -989,44 +999,46 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
private
void
bindInfoSource
(
SubjectPage
subjectPage
)
{
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
String
>
idList
=
subjectPage
.
getBindIds
();
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
if
(
CollectionUtil
.
isEmpty
(
idList
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//绑定通用信息源
bindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
INFO_SOURCE
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//绑定定向信息源
bindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//绑定屏蔽信息源
bindInfoSource
(
subjectPage
,
idList
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE
.
getvalue
());
}
}
private
void
bindLabels
(
SubjectPage
subjectPage
)
{
String
subjectId
=
subjectPage
.
getId
();
String
sourceBindType
=
subjectPage
.
getSourceBindType
();
List
<
BindLabelVo
>
bindLabels
=
subjectPage
.
getBindLabels
();
if
(
CollectionUtil
.
isEmpty
(
bindLabels
))
{
return
;
if
(
CollectionUtil
.
isEmpty
(
bindLabels
))
{
return
;
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"1"
))
{
//绑定通用标签信息源
bindLabels
(
subjectId
,
bindLabels
,
BindTypeEnum
.
INFO_SOURCE_LABEL
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"2"
))
{
//绑定定向标签信息源
bindLabels
(
subjectId
,
bindLabels
,
BindTypeEnum
.
DIRECTIONA_INFO_SOURCE_LABEL
.
getvalue
());
}
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
if
(
StrUtil
.
equals
(
sourceBindType
,
"3"
))
{
//绑定屏蔽标签信息源
bindLabels
(
subjectId
,
bindLabels
,
BindTypeEnum
.
EXCLUDE_INFO_SOURCE_LABEL
.
getvalue
());
}
}
private
void
bindLabels
(
String
subjectId
,
List
<
BindLabelVo
>
bindLabels
,
Integer
bindType
)
{
List
<
SubjectInfoSourceMap
>
mapList
=
new
ArrayList
<>();
...
...
src/main/java/com/zzsn/event/vo/InfoDataSearchCondition.java
浏览文件 @
5d423e75
...
...
@@ -53,7 +53,7 @@ public class InfoDataSearchCondition {
//审核操作(0:未审核 1:审核通过 2:审核未通过 3:暂定 默认值为0)
private
Integer
checkStatus
;
//删除标记(1:删除;0:
保留
)
//删除标记(1:删除;0:
未删除
)
private
Integer
deleteFlag
=
0
;
//关联标签名称
...
...
src/main/java/com/zzsn/event/vo/SubjectDetailVO.java
浏览文件 @
5d423e75
...
...
@@ -50,4 +50,6 @@ public class SubjectDetailVO {
private
List
<
SubjectSampleFile
>
sampleFileList
;
/**关键词信息*/
private
List
<
SearchWordVO
>
keywords
;
/**预估状态*/
private
String
estimateStatus
;
}
src/main/resources/application-dev.yml
浏览文件 @
5d423e75
...
...
@@ -169,3 +169,16 @@ clb:
default
:
processing
:
advanceMonth
:
6
caiji
:
infosourcebind
:
url
:
http://1.95.133.166:8823/baseSourceInfo/api/subject/infoSourceEdit
keyWordsbind
:
url
:
http://1.95.133.166:8823/baseSourceInfo/api/subject/keywordEdit
keyWordsEdit
:
url
:
http://1.95.133.166:8823/baseSourceInfo/api/keyword/edit
allInfosourcebind
:
url
:
http://1.95.133.166:8823/baseSourceInfo/api/subject/infoSourceSave
allKeyWordsBind
:
url
:
http://1.95.133.166:8823/baseSourceInfo/api/subject/keywordSave
projectCode
:
zzsn_prod
projectName
:
克虏宝正式
src/main/resources/application-nacos.yml
浏览文件 @
5d423e75
...
...
@@ -7,13 +7,13 @@ spring:
# nacos 服务注册
discovery
:
enabled
:
true
server-addr
:
1
92.168.0.225
:8848
server-addr
:
1
27.0.0.1
:8848
namespace
:
# 命名空间
# nacos 配置中心
config
:
username
:
nacos
password
:
nacos
server-addr
:
1
92.168.0.225
:8848
server-addr
:
1
27.0.0.1
:8848
namespace
:
# 命名空间
group
:
clb-service
prefix
:
${spring.application.name}
# 配置前缀,默认是应用名
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论