瀏覽代碼

Merge pull request #814 from mviegas/fix/postgres-content-filter

Fixed SQL content filter on IMonitoringApi.PostgreSql.cs
master
xiangxiren 3 年之前
committed by GitHub
父節點
當前提交
641d4acb26
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/DotNetCore.CAP.PostgreSql/IMonitoringApi.PostgreSql.cs

+ 1
- 1
src/DotNetCore.CAP.PostgreSql/IMonitoringApi.PostgreSql.cs 查看文件

@@ -81,7 +81,7 @@ namespace DotNetCore.CAP.PostgreSql

if (!string.IsNullOrEmpty(queryDto.Group)) where += " and Lower(\"Group\") = Lower(@Group)";

if (!string.IsNullOrEmpty(queryDto.Content)) where += " and \"Content\" ILike concat('%',@Content,'%')";
if (!string.IsNullOrEmpty(queryDto.Content)) where += " and \"Content\" ILike @Content";

var sqlQuery =
$"select * from {tableName} where 1=1 {where} order by \"Added\" desc offset @Offset limit @Limit";


Loading…
取消
儲存