mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Add ConnMoreSettings.DisableMillisecond
This commit is contained in:
parent
307c461cf7
commit
edba4ab1c0
@ -11,6 +11,7 @@ namespace SqlSugar
|
||||
public bool IsWithNoLockQuery { get; set; }
|
||||
|
||||
public bool DisableNvarchar { get; set; }
|
||||
public bool DisableMillisecond { get; set; }
|
||||
public bool PgSqlIsAutoToLower = true;
|
||||
public int DefaultCacheDurationInSeconds { get; set; }
|
||||
public bool? TableEnumIsString { get; set; }
|
||||
|
@ -95,7 +95,14 @@ namespace SqlSugar
|
||||
{
|
||||
date = Convert.ToDateTime("1900-1-1");
|
||||
}
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.DisableMillisecond == true)
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss") + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
}
|
||||
else if (type.IsEnum())
|
||||
{
|
||||
|
@ -51,7 +51,14 @@ namespace SqlSugar
|
||||
{
|
||||
date = Convert.ToDateTime("1900-1-1");
|
||||
}
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.DisableMillisecond == true)
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss") + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||
}
|
||||
}
|
||||
else if (type == UtilConstants.DateType && iswhere)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user