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