mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-04 20:57:58 +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") + "'";
|
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";
|
||||||
|
@ -153,7 +153,7 @@ namespace SqlSugar
|
|||||||
while (pageCount >= pageIndex)
|
while (pageCount >= pageIndex)
|
||||||
{
|
{
|
||||||
StringBuilder updateTable = new StringBuilder();
|
StringBuilder updateTable = new StringBuilder();
|
||||||
string setValues = string.Join(",", groupList.First().Where(it=>it.IsPrimarykey==false&&(it.IsIdentity==false||(IsOffIdentity&&it.IsIdentity))).Select(it =>
|
string setValues = string.Join(",", groupList.First().Where(it => it.IsPrimarykey == false && (it.IsIdentity == false || (IsOffIdentity && it.IsIdentity))).Select(it =>
|
||||||
{
|
{
|
||||||
if (SetValues.IsValuable())
|
if (SetValues.IsValuable())
|
||||||
{
|
{
|
||||||
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user