Update .net core project

This commit is contained in:
sunkaixuan 2022-08-25 00:49:02 +08:00
parent c67c6dca03
commit 7e8c0576d3
2 changed files with 9 additions and 2 deletions

View File

@ -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} )";
}

View File

@ -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()
{