mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update Mapper
This commit is contained in:
parent
2ef8e14522
commit
919cd24cbd
@ -133,20 +133,8 @@ namespace SqlSugar
|
||||
if (parameter.BaseExpression is BinaryExpression || parameter.BaseExpression == null)
|
||||
{
|
||||
var oppoSiteExpression = isLeft == true ? parameter.BaseParameter.RightExpression : parameter.BaseParameter.LeftExpression;
|
||||
if (parameter.CurrentExpression is MethodCallExpression || parameter.CurrentExpression is ConditionalExpression || parameter.CurrentExpression.NodeType == ExpressionType.Coalesce)
|
||||
{
|
||||
var appendValue = value;
|
||||
if (this.Context.Result.Contains(ExpressionConst.FormatSymbol))
|
||||
{
|
||||
this.Context.Result.Replace(ExpressionConst.FormatSymbol, appendValue.ObjToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Context.Result.Append(appendValue);
|
||||
}
|
||||
this.AppendOpreator(parameter, isLeft);
|
||||
}
|
||||
else if (value is MapperSql)
|
||||
|
||||
if (value is MapperSql)
|
||||
{
|
||||
var sql = ((MapperSql)value).Sql;
|
||||
if (isLeft == true)
|
||||
@ -162,6 +150,19 @@ namespace SqlSugar
|
||||
this.Context.Result.Append(sql);
|
||||
}
|
||||
}
|
||||
else if(parameter.CurrentExpression is MethodCallExpression || parameter.CurrentExpression is ConditionalExpression || parameter.CurrentExpression.NodeType == ExpressionType.Coalesce)
|
||||
{
|
||||
var appendValue = value;
|
||||
if (this.Context.Result.Contains(ExpressionConst.FormatSymbol))
|
||||
{
|
||||
this.Context.Result.Replace(ExpressionConst.FormatSymbol, appendValue.ObjToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Context.Result.Append(appendValue);
|
||||
}
|
||||
this.AppendOpreator(parameter, isLeft);
|
||||
}
|
||||
else if (oppoSiteExpression is MemberExpression)
|
||||
{
|
||||
string appendValue = Context.SqlParameterKeyWord
|
||||
|
@ -245,6 +245,10 @@ namespace SqlSugar
|
||||
var value = ExpressionTool.GetMemberValue(expression.Member, expression);
|
||||
if (isSetTempData)
|
||||
{
|
||||
if (value is MapperSql)
|
||||
{
|
||||
value = (value as MapperSql).Sql;
|
||||
}
|
||||
baseParameter.CommonTempData = value;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user