Update distinct

This commit is contained in:
sunkaixuan 2023-12-27 13:50:01 +08:00
parent b79576c61c
commit 10721cb91f

View File

@ -113,7 +113,7 @@ namespace SqlSugar
{ {
this.SelectCacheKey = this.SelectCacheKey + string.Join("-", this.JoinQueryInfos.Select(it => it.TableName)); this.SelectCacheKey = this.SelectCacheKey + string.Join("-", this.JoinQueryInfos.Select(it => it.TableName));
} }
if (IsDistinct) if (IsDistinct&&result?.TrimStart()?.StartsWith("distinct ")!=true)
{ {
result = "distinct "+result; result = "distinct "+result;
} }