Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
qiuqunfeng
waf-console
Commits
f77ce263
Commit
f77ce263
authored
Mar 28, 2025
by
qiuqunfeng
Browse files
fix
parent
7d814c33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
internal/service/waf.go
internal/service/waf.go
+2
-1
No files found.
internal/service/waf.go
View file @
f77ce263
...
@@ -1292,7 +1292,8 @@ func (s *wafService) ListListenerHistory(ctx context.Context, query *WafListener
...
@@ -1292,7 +1292,8 @@ func (s *wafService) ListListenerHistory(ctx context.Context, query *WafListener
db
=
db
.
Where
(
query
.
WhereEqCondition
)
db
=
db
.
Where
(
query
.
WhereEqCondition
)
}
}
for
_
,
val
:=
range
query
.
WhereLikeCondition
{
for
_
,
val
:=
range
query
.
WhereLikeCondition
{
db
=
db
.
Where
(
fmt
.
Sprintf
(
"%s LIKE ?"
,
"name"
),
GetLikeExpr
(
val
))
.
Or
(
"%s LIKE ?"
,
"listener_name"
)
.
Or
(
"%s LIKE ?"
,
"gateway_name"
)
expr
:=
GetLikeExpr
(
val
)
db
=
db
.
Where
(
fmt
.
Sprintf
(
"%s LIKE ?"
,
"name"
),
expr
)
.
Or
(
"listener_name LIKE ?"
,
expr
)
.
Or
(
"gateway_name LIKE ?"
,
expr
)
}
}
if
limit
>
0
&&
offset
>=
0
{
if
limit
>
0
&&
offset
>=
0
{
db
=
db
.
Offset
(
offset
)
.
Limit
(
limit
)
db
=
db
.
Offset
(
offset
)
.
Limit
(
limit
)
...
...
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