Special conversion

This commit is contained in:
sunkaixuan 2023-05-12 17:20:23 +08:00
parent 2fa557b73c
commit 80d5a14b70

View File

@ -746,8 +746,17 @@ namespace SqlSugar
{
var propertyName = kv.Key.Replace("SugarNav_", "");
var propertyInfo = columns.First(i => i.PropertyName == propertyName).PropertyInfo;
if (kv.Value is decimal &&UtilMethods.GetUnderType(propertyInfo.PropertyType).IsIn(typeof(int), typeof(long)))
{
var changeValue = UtilMethods.ChangeType2(kv.Value, propertyInfo.PropertyType);
propertyInfo.SetValue(addItem, changeValue);
}
else
{
propertyInfo.SetValue(addItem, kv.Value);
}
}
(outList as IList).Add(addItem);
index++;
}