mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 04:13:48 +08:00
Update Enum
This commit is contained in:
parent
8ee2cf6e81
commit
03a7ef5814
@ -165,6 +165,10 @@ namespace SqlSugar
|
||||
}
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
else if (type.GetTypeInfo().IsEnum())
|
||||
{
|
||||
return Convert.ToInt64(value);
|
||||
}
|
||||
else if (type == PubConst.BoolType)
|
||||
{
|
||||
return value.ObjToBool() ? "1" : "0";
|
||||
|
@ -253,11 +253,16 @@ namespace SqlSugar
|
||||
if (type == PubConst.DateType)
|
||||
{
|
||||
var date = value.ObjToDate();
|
||||
if (date < Convert.ToDateTime("1900-1-1")) {
|
||||
if (date < Convert.ToDateTime("1900-1-1"))
|
||||
{
|
||||
date = Convert.ToDateTime("1900-1-1");
|
||||
}
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
else if (type.GetTypeInfo().IsEnum())
|
||||
{
|
||||
return Convert.ToInt64(value);
|
||||
}
|
||||
else if (type == PubConst.BoolType)
|
||||
{
|
||||
return value.ObjToBool() ? "1" : "0";
|
||||
|
@ -52,6 +52,10 @@ namespace SqlSugar
|
||||
}
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
else if (type.GetTypeInfo().IsEnum())
|
||||
{
|
||||
return Convert.ToInt64(value);
|
||||
}
|
||||
else if (type == PubConst.BoolType)
|
||||
{
|
||||
return value.ObjToBool() ? "1" : "0";
|
||||
|
@ -29,6 +29,10 @@ namespace SqlSugar
|
||||
}
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
else if (type.GetTypeInfo().IsEnum())
|
||||
{
|
||||
return Convert.ToInt64(value);
|
||||
}
|
||||
else if (type == PubConst.BoolType)
|
||||
{
|
||||
return value.ObjToBool() ? "1" : "0";
|
||||
|
Loading…
Reference in New Issue
Block a user