mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Update DateOnly
This commit is contained in:
@@ -736,6 +736,7 @@ namespace SqlSugar
|
||||
var addItem = readerValues[info];
|
||||
if (addItem == DBNull.Value)
|
||||
addItem = null;
|
||||
var underType = UtilMethods.GetUnderType(prop.PropertyType);
|
||||
if (prop.PropertyType == UtilConstants.IntType)
|
||||
{
|
||||
addItem = addItem.ObjToInt();
|
||||
@@ -752,6 +753,10 @@ namespace SqlSugar
|
||||
{
|
||||
addItem = addItem.ObjToInt();
|
||||
}
|
||||
else if (addItem!=null&&underType?.FullName == "System.DateOnly")
|
||||
{
|
||||
addItem = Convert.ToDateTime(addItem).ToString("yyyy-MM-dd");
|
||||
}
|
||||
else if (UtilMethods.GetUnderType(prop.PropertyType).IsEnum() && addItem is decimal)
|
||||
{
|
||||
if (prop.PropertyType.IsEnum() == false && addItem == null)
|
||||
|
Reference in New Issue
Block a user