mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update ReportableProvider
This commit is contained in:
parent
8d3910df9b
commit
5db88df5c9
@ -108,7 +108,7 @@ namespace SqlSugar
|
|||||||
private object GetSelect<Y>(EntityColumnInfo it,Y data)
|
private object GetSelect<Y>(EntityColumnInfo it,Y data)
|
||||||
{
|
{
|
||||||
|
|
||||||
return string.Format(" {0} AS {1} ", FormatValue(it.PropertyInfo.GetValue(data,null)),it.PropertyName);
|
return string.Format(" {0} AS {1} ", FormatValue(it.PropertyInfo.GetValue(data,null), it),it.PropertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NoClassMethod<Y>(Y data, StringBuilder sb,bool isLast)
|
private void NoClassMethod<Y>(Y data, StringBuilder sb,bool isLast)
|
||||||
@ -194,8 +194,12 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
private object FormatValue(object value)
|
private object FormatValue(object value,EntityColumnInfo entityColumnInfo=null)
|
||||||
{
|
{
|
||||||
|
if (entityColumnInfo != null && value == null&&this.Context.CurrentConnectionConfig.DbType==DbType.SqlServer)
|
||||||
|
{
|
||||||
|
return $" CAST( NULL AS DATETIME) ";
|
||||||
|
}
|
||||||
if (value == null)
|
if (value == null)
|
||||||
return "null";
|
return "null";
|
||||||
var type =UtilMethods.GetUnderType(value.GetType());
|
var type =UtilMethods.GetUnderType(value.GetType());
|
||||||
|
Loading…
Reference in New Issue
Block a user