mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update exp to sql
This commit is contained in:
parent
0e9cbefd86
commit
571769009c
@ -153,7 +153,7 @@ namespace SqlSugar
|
|||||||
mapper.Sql = queryable
|
mapper.Sql = queryable
|
||||||
.AS(this.ProPertyEntity.DbTableName)
|
.AS(this.ProPertyEntity.DbTableName)
|
||||||
.WhereIF(!string.IsNullOrEmpty(whereSql), whereSql)
|
.WhereIF(!string.IsNullOrEmpty(whereSql), whereSql)
|
||||||
.Where($" {name}={ShorName}.{pk} ").Select(" COUNT(1) ").ToSql().Key;
|
.Where($" {name}={ShorName}.{pk} ").Select(MethodName=="Any"?"1":" COUNT(1) ").ToSql().Key;
|
||||||
mapper.Sql = $" ({mapper.Sql}) ";
|
mapper.Sql = $" ({mapper.Sql}) ";
|
||||||
mapper.Sql = GetMethodSql(mapper.Sql);
|
mapper.Sql = GetMethodSql(mapper.Sql);
|
||||||
return mapper;
|
return mapper;
|
||||||
@ -163,7 +163,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (MethodName == "Any")
|
if (MethodName == "Any")
|
||||||
{
|
{
|
||||||
return $" ({sql}>0 ) ";
|
return $" ( EXISTS {sql} ) ";
|
||||||
}
|
}
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user