Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
middleware-automatic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenjunjie
middleware-automatic
Commits
ba829f3a
Commit
ba829f3a
authored
May 22, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'release'
2023年05/22 聚合模板细节调整 See merge request
!42
parents
fb9ffe4e
f70040f0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
6 deletions
+12
-6
middleware-automatic-center-client/src/main/java/com/zhiwei/middleware/automatic/server/util/RedissonUtil.java
+1
-0
middleware-automatic-center-server/src/main/resources/pushlog.properties
+1
-1
middleware-automatic-center-son/src/main/java/com/zhiwei/middleware/automatic/son/task/service/TaskServiceCommon.java
+5
-4
middleware-automatic-center-son/src/main/java/com/zhiwei/middleware/automatic/son/task/service/TaskServiceTemplate.java
+4
-0
middleware-automatic-center-son/src/main/resources/pushlog.properties
+1
-1
No files found.
middleware-automatic-center-client/src/main/java/com/zhiwei/middleware/automatic/server/util/RedissonUtil.java
View file @
ba829f3a
...
@@ -101,6 +101,7 @@ public class RedissonUtil {
...
@@ -101,6 +101,7 @@ public class RedissonUtil {
public
void
setList
(
String
key
,
List
<
String
>
value
)
{
public
void
setList
(
String
key
,
List
<
String
>
value
)
{
RList
<
Object
>
list
=
redissonClient
.
getList
(
redisKey
(
key
));
RList
<
Object
>
list
=
redissonClient
.
getList
(
redisKey
(
key
));
list
.
addAll
(
value
);
list
.
addAll
(
value
);
list
.
expire
(
10
,
TimeUnit
.
MINUTES
);
}
}
public
void
deleteList
(
String
key
)
{
public
void
deleteList
(
String
key
)
{
RList
<
Object
>
list
=
redissonClient
.
getList
(
redisKey
(
key
));
RList
<
Object
>
list
=
redissonClient
.
getList
(
redisKey
(
key
));
...
...
middleware-automatic-center-server/src/main/resources/pushlog.properties
View file @
ba829f3a
...
@@ -2,7 +2,7 @@ prod.robot.push.address=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e22
...
@@ -2,7 +2,7 @@ prod.robot.push.address=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e22
prod.robot.push.enable
=
true
prod.robot.push.enable
=
true
prod.robot.push.filterclass
=
org.apache.dubbo.common.Version,com.alibaba.dubbo.common.Version,org.apache.dubbo.monitor.dubbo.DubboMonitor,com.alibaba.dubbo.monitor.dubbo.DubboMonitor
prod.robot.push.filterclass
=
org.apache.dubbo.common.Version,com.alibaba.dubbo.common.Version,org.apache.dubbo.monitor.dubbo.DubboMonitor,com.alibaba.dubbo.monitor.dubbo.DubboMonitor
prod.robot.push.level
=
error
prod.robot.push.level
=
error
prod.robot.push.app.name
=
automatic-server-prod
prod.robot.push.app.name
=
automatic-
mark-
server-prod
dev.robot.push.address
=
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e2218c6e-af6a-4296-9d75-7178b941a3b5
dev.robot.push.address
=
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e2218c6e-af6a-4296-9d75-7178b941a3b5
dev.robot.push.enable
=
false
dev.robot.push.enable
=
false
...
...
middleware-automatic-center-son/src/main/java/com/zhiwei/middleware/automatic/son/task/service/TaskServiceCommon.java
View file @
ba829f3a
...
@@ -202,6 +202,9 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
...
@@ -202,6 +202,9 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
String
title
=
Tools
.
filterSymbol
(
markInfo
.
getSourceObj
().
getString
(
GenericAttribute
.
ES_TITLE
));
String
title
=
Tools
.
filterSymbol
(
markInfo
.
getSourceObj
().
getString
(
GenericAttribute
.
ES_TITLE
));
return
null
!=
title
&&
title
.
length
()
>
6
;
return
null
!=
title
&&
title
.
length
()
>
6
;
}).
filter
(
e
->
autoMark
(
group
,
e
,
titleVoMap
)).
collect
(
Collectors
.
toList
());
}).
filter
(
e
->
autoMark
(
group
,
e
,
titleVoMap
)).
collect
(
Collectors
.
toList
());
if
(
newList
.
isEmpty
())
{
return
;
}
// 模板更新
// 模板更新
for
(
Map
.
Entry
<
String
,
TemplateTitleVo
>
entry
:
titleVoMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
TemplateTitleVo
>
entry
:
titleVoMap
.
entrySet
())
{
if
(
entry
.
getValue
().
getDaySum
()
==
0
)
{
if
(
entry
.
getValue
().
getDaySum
()
==
0
)
{
...
@@ -210,7 +213,7 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
...
@@ -210,7 +213,7 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
templateTitleService
.
setTemplateValue
(
group
,
entry
.
getKey
(),
entry
.
getValue
());
templateTitleService
.
setTemplateValue
(
group
,
entry
.
getKey
(),
entry
.
getValue
());
}
}
// 自动标注数据发送到标注中间件
// 自动标注数据发送到标注中间件
//
dubboHandler.markUpsert(newList);
dubboHandler
.
markUpsert
(
newList
);
}
}
private
boolean
autoMark
(
String
group
,
MarkInfo
markInfo
,
Map
<
String
,
TemplateTitleVo
>
titleVoMap
)
{
private
boolean
autoMark
(
String
group
,
MarkInfo
markInfo
,
Map
<
String
,
TemplateTitleVo
>
titleVoMap
)
{
...
@@ -232,10 +235,8 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
...
@@ -232,10 +235,8 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
try
{
try
{
String
[]
updates
=
dubboHandler
.
getMupdates
(
markInfo
.
filterInfo
());
String
[]
updates
=
dubboHandler
.
getMupdates
(
markInfo
.
filterInfo
());
templateTitleVo
.
refreshMark
();
templateTitleVo
.
refreshMark
();
// 特征值记录
//
// 特征值记录
templateTitleService
.
insertTemplateRecord
(
new
TemplateRecord
(
templateTitleVo
.
getId
(),
updates
[
0
]));
templateTitleService
.
insertTemplateRecord
(
new
TemplateRecord
(
templateTitleVo
.
getId
(),
updates
[
0
]));
// 模板标注count累加
// redissonUtil.putCount(Tools.assembleKey(COUNT_KEY, group, templateTitleVo.getId()), 1);
// 测试环境临时添加,用于对比
// 测试环境临时添加,用于对比
templateRecordDao
.
tempRecord
(
new
TemplateTempRecord
(
templateTitleVo
.
getId
(),
templateTitleVo
.
getTemplateTitle
(),
group
,
getUrl
(
markInfo
),
templateRecordDao
.
tempRecord
(
new
TemplateTempRecord
(
templateTitleVo
.
getId
(),
templateTitleVo
.
getTemplateTitle
(),
group
,
getUrl
(
markInfo
),
sourceObj
.
getString
(
"_id"
),
templateTitleVo
.
getMtag
()));
sourceObj
.
getString
(
"_id"
),
templateTitleVo
.
getMtag
()));
...
...
middleware-automatic-center-son/src/main/java/com/zhiwei/middleware/automatic/son/task/service/TaskServiceTemplate.java
View file @
ba829f3a
...
@@ -203,6 +203,7 @@ public class TaskServiceTemplate extends BaseTaskTypePair<TaskServiceTemplate.Ta
...
@@ -203,6 +203,7 @@ public class TaskServiceTemplate extends BaseTaskTypePair<TaskServiceTemplate.Ta
return
false
;
return
false
;
}
else
if
(
e
.
getValue
().
getStatus
()
==
TemplateStatus
.
已重置
)
{
}
else
if
(
e
.
getValue
().
getStatus
()
==
TemplateStatus
.
已重置
)
{
log
.
info
(
"已重置的模板从内存中删除,模板title:{}"
,
e
.
getKey
());
log
.
info
(
"已重置的模板从内存中删除,模板title:{}"
,
e
.
getKey
());
templateTitleService
.
deleteTemplate
(
group
,
title
);
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
@@ -232,6 +233,9 @@ public class TaskServiceTemplate extends BaseTaskTypePair<TaskServiceTemplate.Ta
...
@@ -232,6 +233,9 @@ public class TaskServiceTemplate extends BaseTaskTypePair<TaskServiceTemplate.Ta
String
tag
=
tagGroup
.
entrySet
().
stream
().
max
(
Map
.
Entry
.
comparingByValue
()).
map
(
Map
.
Entry
::
getKey
).
get
();
String
tag
=
tagGroup
.
entrySet
().
stream
().
max
(
Map
.
Entry
.
comparingByValue
()).
map
(
Map
.
Entry
::
getKey
).
get
();
// 生成模板
// 生成模板
String
title
=
Tools
.
filterSymbol
(
result
.
getClusterName
());
String
title
=
Tools
.
filterSymbol
(
result
.
getClusterName
());
if
(
title
.
length
()
<
6
)
{
continue
;
}
aggregationTitleTagMap
.
put
(
title
,
new
TemplateTitleVo
(
title
,
tag
,
sourceList
.
get
(
result
.
getDataPoints
().
get
(
0
)).
getUrl
()));
aggregationTitleTagMap
.
put
(
title
,
new
TemplateTitleVo
(
title
,
tag
,
sourceList
.
get
(
result
.
getDataPoints
().
get
(
0
)).
getUrl
()));
}
}
return
aggregationTitleTagMap
;
return
aggregationTitleTagMap
;
...
...
middleware-automatic-center-son/src/main/resources/pushlog.properties
View file @
ba829f3a
...
@@ -2,7 +2,7 @@ prod.robot.push.address=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e22
...
@@ -2,7 +2,7 @@ prod.robot.push.address=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e22
prod.robot.push.enable
=
true
prod.robot.push.enable
=
true
prod.robot.push.filterclass
=
org.apache.dubbo.common.Version,com.alibaba.dubbo.common.Version,org.apache.dubbo.monitor.dubbo.DubboMonitor,com.alibaba.dubbo.monitor.dubbo.DubboMonitor
prod.robot.push.filterclass
=
org.apache.dubbo.common.Version,com.alibaba.dubbo.common.Version,org.apache.dubbo.monitor.dubbo.DubboMonitor,com.alibaba.dubbo.monitor.dubbo.DubboMonitor
prod.robot.push.level
=
error
prod.robot.push.level
=
error
prod.robot.push.app.name
=
automatic-
server
-prod
prod.robot.push.app.name
=
automatic-
mark-son
-prod
dev.robot.push.address
=
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e2218c6e-af6a-4296-9d75-7178b941a3b5
dev.robot.push.address
=
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e2218c6e-af6a-4296-9d75-7178b941a3b5
dev.robot.push.enable
=
false
dev.robot.push.enable
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment