Compare commits

..

2 Commits

Author SHA1 Message Date
hang a64127537e Merge branch 'Test.Study' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test.Study
continuous-integration/drone/push Build is passing Details
2024-01-04 12:16:39 +08:00
hang 2287c8869d 修改导表错误 2024-01-04 12:16:31 +08:00
1 changed files with 9 additions and 1 deletions

View File

@ -60,7 +60,15 @@ namespace IRaCIS.Core.Infrastructure.Extention
string propertyName = property.Name;
object propertyValue = property.GetValue(obj);
dictionary.Add(propertyName, propertyValue);
// 如果属性的类型是枚举,将其值保留为整数
if (property.PropertyType.IsEnum)
{
dictionary.Add(propertyName, (int)propertyValue);
}
else
{
dictionary.Add(propertyName, propertyValue);
}
}
return dictionary;