mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Update .net core project
This commit is contained in:
@@ -2495,7 +2495,7 @@ namespace SqlSugar
|
||||
if (this.QueryBuilder.AsTables != null && this.QueryBuilder.AsTables.Count==1)
|
||||
{
|
||||
var tableinfo = this.QueryBuilder.AsTables.First();
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockQuery == true&& this.QueryBuilder.AsTables.First().Value.ObjToString().Contains(SqlWith.NoLock) ==false)
|
||||
if (this.QueryBuilder.TableWithString!=SqlWith.Null&&this.Context.CurrentConnectionConfig?.MoreSettings?.IsWithNoLockQuery == true&& this.QueryBuilder.AsTables.First().Value.ObjToString().Contains(SqlWith.NoLock) ==false)
|
||||
{
|
||||
this.QueryBuilder.AsTables[tableinfo.Key] = " (SELECT * FROM " + this.QueryBuilder.AsTables.First().Value + $" {SqlWith.NoLock} )";
|
||||
}
|
||||
|
@@ -150,7 +150,14 @@ namespace SqlSugar
|
||||
{
|
||||
var parameter = model.Args[0];
|
||||
var parameter1 = model.Args[1];
|
||||
return string.Format("IFNULL({0},{1})", parameter.MemberName, parameter1.MemberName);
|
||||
if (parameter1.MemberValue is bool)
|
||||
{
|
||||
return string.Format("IFNULL(CAST({0} as SIGNED),{1})", parameter.MemberName, parameter1.MemberName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format("IFNULL({0},{1})", parameter.MemberName, parameter1.MemberName);
|
||||
}
|
||||
}
|
||||
public override string GetDate()
|
||||
{
|
||||
|
Reference in New Issue
Block a user