Update WhereClass

This commit is contained in:
sunkaixuan 2022-05-20 19:25:52 +08:00
parent 05b6c04479
commit 4389ee561a

View File

@ -521,18 +521,22 @@ namespace SqlSugar
FieldValue = value.ObjToString(),
CSharpTypeName=column.PropertyInfo.PropertyType.Name
});
if (value != null && value.GetType().IsEnum())
if (value != null && value.GetType().IsEnum())
{
if (this.Context.CurrentConnectionConfig?.MoreSettings?.TableEnumIsString == true)
{
}
else
else
{
data.Value.FieldValue = Convert.ToInt64(value).ObjToString();
}
}
else if (value != null && column.PropertyInfo.PropertyType == UtilConstants.DateType)
{
data.Value.FieldValue = value.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.ffffff");
}
cons.ConditionalList.Add(data);
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
{