Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
tsai
CAP
Commits
fd012740
Commit
fd012740
authored
Dec 29, 2019
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dashboard sql like query bug. #470
parent
5150aee5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
IMonitoringApi.PostgreSql.cs
src/DotNetCore.CAP.PostgreSql/IMonitoringApi.PostgreSql.cs
+1
-1
IMonitoringApi.SqlServer.cs
src/DotNetCore.CAP.SqlServer/IMonitoringApi.SqlServer.cs
+2
-2
No files found.
src/DotNetCore.CAP.PostgreSql/IMonitoringApi.PostgreSql.cs
View file @
fd012740
...
...
@@ -82,7 +82,7 @@ select count(""Id"") from {_recName} where ""StatusName"" = N'Failed';";
if
(!
string
.
IsNullOrEmpty
(
queryDto
.
Group
))
where
+=
" and Lower(\"Group\") = Lower(@Group)"
;
if
(!
string
.
IsNullOrEmpty
(
queryDto
.
Content
))
where
+=
" and \"Content\" ILike
'%@Content%'
"
;
if
(!
string
.
IsNullOrEmpty
(
queryDto
.
Content
))
where
+=
" and \"Content\" ILike
concat('%',@Content,'%')
"
;
var
sqlQuery
=
$"select * from
{
tableName
}
where 1=1
{
where
}
order by \"Added\" desc offset @Offset limit @Limit"
;
...
...
src/DotNetCore.CAP.SqlServer/IMonitoringApi.SqlServer.cs
View file @
fd012740
...
...
@@ -79,7 +79,7 @@ select count(Id) from {_recName} with (nolock) where StatusName = N'Failed';";
if
(!
string
.
IsNullOrEmpty
(
queryDto
.
Group
))
where
+=
" and [group]=@Group"
;
if
(!
string
.
IsNullOrEmpty
(
queryDto
.
Content
))
where
+=
" and content like
'%@Content%'
"
;
if
(!
string
.
IsNullOrEmpty
(
queryDto
.
Content
))
where
+=
" and content like
@Content
"
;
var
sqlQuery2008
=
$@"select * from
...
...
@@ -96,7 +96,7 @@ select count(Id) from {_recName} with (nolock) where StatusName = N'Failed';";
queryDto
.
StatusName
,
queryDto
.
Group
,
queryDto
.
Name
,
queryDto
.
Content
,
Content
=
"%"
+
queryDto
.
Content
+
"%"
,
Offset
=
queryDto
.
CurrentPage
*
queryDto
.
PageSize
,
Limit
=
queryDto
.
PageSize
}).
ToList
());
...
...
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