Commit fd012740 authored by Savorboard's avatar Savorboard

Fix dashboard sql like query bug. #470

parent 5150aee5
......@@ -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";
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment