Browse Source

-

pull/2/head
skx 4 years ago
parent
commit
809ad2b6a8
  1. 32
      Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs

32
Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs

@ -146,6 +146,22 @@ namespace SqlSugar
}
this.AppendOpreator(parameter, isLeft);
}
else if (value is MapperSql)
{
var sql = ((MapperSql)value).Sql;
if (isLeft == true)
{
sql += ExpressionConst.ExpressionReplace + parameter.BaseParameter.Index;
}
if (this.Context.Result.Contains(ExpressionConst.FormatSymbol))
{
this.Context.Result.Replace(ExpressionConst.FormatSymbol, sql);
}
else
{
this.Context.Result.Append(sql);
}
}
else if (oppoSiteExpression is MemberExpression)
{
string appendValue = Context.SqlParameterKeyWord
@ -202,22 +218,6 @@ namespace SqlSugar
this.Context.Result.Append(appendValue);
}
}
else if (value is MapperSql)
{
var sql = ((MapperSql)value).Sql;
if (isLeft == true)
{
sql += ExpressionConst.ExpressionReplace + parameter.BaseParameter.Index;
}
if (this.Context.Result.Contains(ExpressionConst.FormatSymbol))
{
this.Context.Result.Replace(ExpressionConst.FormatSymbol, sql);
}
else
{
this.Context.Result.Append(sql);
}
}
else
{
var appendValue = this.Context.SqlParameterKeyWord + ExpressionConst.Const + Context.ParameterIndex;

Loading…
Cancel
Save