提交 5d423e75 作者: obcy

Merge remote-tracking branch 'origin/event_fusion' into event_fusion

......@@ -28,3 +28,8 @@ svc_port="1689"
nacos_server="192.168.0.224:8848"
nacos_username="nacos"
nacos_password="nacos"
# 资源限制
## cpu
limit_cpu=2.0
limit_mem=2g
\ No newline at end of file
......@@ -28,3 +28,8 @@ svc_port="1689"
nacos_server="192.168.0.225:8848"
nacos_username="nacos"
nacos_password="nacos"
# 资源限制
## cpu
limit_cpu=2.0
limit_mem=2g
\ No newline at end of file
......@@ -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}"
}
# 错误处理
......
......@@ -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);
}
......
......@@ -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);
}
/**
* 删除专题
*
......
......@@ -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<>();
}
......
......@@ -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,
......
......@@ -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">
......
......@@ -53,7 +53,7 @@ public class InfoDataSearchCondition {
//审核操作(0:未审核 1:审核通过 2:审核未通过 3:暂定 默认值为0)
private Integer checkStatus;
//删除标记(1:删除;0:保留)
//删除标记(1:删除;0:未删除)
private Integer deleteFlag = 0;
//关联标签名称
......
......@@ -50,4 +50,6 @@ public class SubjectDetailVO {
private List<SubjectSampleFile> sampleFileList;
/**关键词信息*/
private List<SearchWordVO> keywords;
/**预估状态*/
private String estimateStatus;
}
......@@ -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: 克虏宝正式
......@@ -7,13 +7,13 @@ spring:
# nacos 服务注册
discovery:
enabled: true
server-addr: 192.168.0.225:8848
server-addr: 127.0.0.1:8848
namespace: # 命名空间
# nacos 配置中心
config:
username: nacos
password: nacos
server-addr: 192.168.0.225:8848
server-addr: 127.0.0.1:8848
namespace: # 命名空间
group: clb-service
prefix: ${spring.application.name} # 配置前缀,默认是应用名
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论