Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-operation-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-operation-api
Commits
aac4f579
Commit
aac4f579
authored
Jul 20, 2023
by
李科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 完善批量关闭预警
parent
64e49181
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
src/service/alert.go
src/service/alert.go
+6
-11
No files found.
src/service/alert.go
View file @
aac4f579
...
...
@@ -411,20 +411,15 @@ func (a *AlertSvc) BatchPushAlert(session *xorm.Session, req request.BatchPushAl
}
func
(
a
*
AlertSvc
)
BatchCloseAlert
(
req
request
.
BatchCloseAlert
)
(
err
error
)
{
var
ids
[]
int
if
len
(
req
.
Ids
)
>
0
{
for
_
,
id
:=
range
req
.
Ids
{
err
=
a
.
IndexUpdate
(
request
.
UpdateAlert
{
Id
:
id
,
CloseRemark
:
req
.
CloseRemark
,
Status
:
3
,
})
if
err
!=
nil
{
return
}
}
ids
=
req
.
Ids
}
else
{
ids
=
append
(
ids
,
req
.
Id
)
}
for
_
,
id
:=
range
ids
{
err
=
a
.
IndexUpdate
(
request
.
UpdateAlert
{
Id
:
req
.
I
d
,
Id
:
i
d
,
CloseRemark
:
req
.
CloseRemark
,
DeferPush
:
req
.
DeferPush
,
Status
:
3
,
...
...
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