mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Synchronization code
This commit is contained in:
parent
c42f6ffd1a
commit
c3244849db
@ -152,15 +152,19 @@ namespace SqlSugar
|
||||
{
|
||||
if (IsNoUpdateNull)
|
||||
{
|
||||
DbColumnInfoList = DbColumnInfoList.Where(it => it.Value != null).ToList();
|
||||
DbColumnInfoList = DbColumnInfoList.Where(it => it.Value != null||(it.UpdateServerTime == true ||!string.IsNullOrEmpty(it.UpdateSql))).ToList();
|
||||
}
|
||||
if (IsNoUpdateDefaultValue)
|
||||
{
|
||||
DbColumnInfoList = DbColumnInfoList.Where(it => {
|
||||
if (it.Value.ObjToString()=="0" && it.PropertyType.IsEnum)
|
||||
if (it.Value.ObjToString() == "0" && it.PropertyType.IsEnum)
|
||||
{
|
||||
return it.Value.ObjToLong() != UtilMethods.DefaultForType(it.PropertyType).ObjToLong();
|
||||
}
|
||||
else if (it.UpdateServerTime == true || !string.IsNullOrEmpty(it.UpdateSql))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return it.Value.ObjToString() != UtilMethods.DefaultForType(it.PropertyType).ObjToString();
|
||||
|
Loading…
Reference in New Issue
Block a user