Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
王蔡翾
operation_platform
Commits
4bc11df9
Commit
4bc11df9
authored
Apr 13, 2026
by
王蔡翾
Browse files
新增工单逻辑修改
parent
1d2b9e92
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/example/operation_platform/service/impl/BsWorkServiceImpl.java
View file @
4bc11df9
...
@@ -141,14 +141,14 @@ public class BsWorkServiceImpl extends ServiceImpl <BsWorkMapper, BsWorkEntity>
...
@@ -141,14 +141,14 @@ public class BsWorkServiceImpl extends ServiceImpl <BsWorkMapper, BsWorkEntity>
if
(
bsProjectEntity
!=
null
){
if
(
bsProjectEntity
!=
null
){
bsWorkDTO
.
setProjectId
(
bsProjectEntity
.
getId
());
bsWorkDTO
.
setProjectId
(
bsProjectEntity
.
getId
());
}
}
//先检查项目中是否存在相同错误,若存在则原来错误次数+1,不创建新工单,若不存在则创建工单
//先检查项目中是否存在相同错误
且未处理的工单
,若存在则原来错误次数+1,不创建新工单,若不存在则创建工单
QueryWrapper
<
BsWorkEntity
>
wrapper
=
new
QueryWrapper
<
BsWorkEntity
>()
QueryWrapper
<
BsWorkEntity
>
wrapper
=
new
QueryWrapper
<
BsWorkEntity
>()
.
eq
(
"project_id"
,
bsWorkDTO
.
getProjectId
());
.
eq
(
"project_id"
,
bsWorkDTO
.
getProjectId
());
if
(
bsWorkDTO
.
getDetail
()
!=
null
)
{
if
(
bsWorkDTO
.
getDetail
()
!=
null
)
{
wrapper
.
eq
(
"detail"
,
bsWorkDTO
.
getDetail
());
wrapper
.
eq
(
"detail"
,
bsWorkDTO
.
getDetail
())
.
eq
(
"待处理"
,
bsWorkDTO
.
getStatus
())
;
}
else
{
}
else
{
wrapper
.
isNull
(
"detail"
);
wrapper
.
isNull
(
"detail"
)
.
eq
(
"待处理"
,
bsWorkDTO
.
getStatus
())
;
}
}
BsWorkEntity
bsWork
=
getOne
(
wrapper
);
BsWorkEntity
bsWork
=
getOne
(
wrapper
);
...
...
src/main/java/com/example/operation_platform/task/ServerAlertTask.java
View file @
4bc11df9
...
@@ -54,7 +54,7 @@ public class ServerAlertTask {
...
@@ -54,7 +54,7 @@ public class ServerAlertTask {
bsWorkDTO
.
setDetail
(
projectServerAlertsVO
.
getDescription
());
bsWorkDTO
.
setDetail
(
projectServerAlertsVO
.
getDescription
());
bsWorkDTO
.
setLoginName
(
user
.
getName
());
bsWorkDTO
.
setLoginName
(
user
.
getName
());
bsWorkDTO
.
setHandleBy
(
schedule
.
getUserId
());
bsWorkDTO
.
setHandleBy
(
schedule
.
getUserId
());
bsWorkService
.
addWork
(
bsWorkDTO
);
bsWorkService
.
addWork
ByOperationTable
(
bsWorkDTO
);
}
}
}
}
}
}
...
...
src/main/resources/mapper/ProjectServerAlertsMapper.xml
View file @
4bc11df9
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
bp.id as projectId
bp.id as projectId
from project_server_alerts psa
from project_server_alerts psa
left join bs_project bp on bp.ips like concat('%',psa.ip_address,'%') COLLATE utf8mb4_general_ci
left join bs_project bp on bp.ips like concat('%',psa.ip_address,'%') COLLATE utf8mb4_general_ci
where psa.alert_time >=
#{time}
where psa.alert_time >=
DATE_SUB(NOW(), INTERVAL 1 MINUTE)
and psa.resolved = false
and psa.resolved = false
</select>
</select>
</mapper>
</mapper>
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