mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-03 20:04:08 +08:00
Update enum bug
This commit is contained in:
@@ -323,9 +323,16 @@ namespace SqlSugar
|
||||
{
|
||||
var valueType = value.GetType();
|
||||
if (valueType.IsIn(UtilConstants.FloatType, UtilConstants.DecType, UtilConstants.DobType))
|
||||
{
|
||||
if (Convert.ToDecimal(value) < 0)
|
||||
{
|
||||
value = Convert.ToInt32(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = Convert.ToUInt32(value);
|
||||
}
|
||||
}
|
||||
else if (valueType == UtilConstants.StringType)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value.ObjToString());
|
||||
|
||||
Reference in New Issue
Block a user