mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
08fea82e89
commit
94338306e6
@ -750,7 +750,7 @@ namespace SqlSugar
|
||||
UtilMethods.StartCustomSplitTable(this.Context, typeof(T));
|
||||
var splitTableAttribute = typeof(T).GetCustomAttribute<SplitTableAttribute>();
|
||||
if (splitTableAttribute != null)
|
||||
{
|
||||
{
|
||||
return SplitTable((splitTableAttribute as SplitTableAttribute).SplitType);
|
||||
}
|
||||
else
|
||||
|
@ -335,6 +335,15 @@ namespace SqlSugar
|
||||
context.CurrentConnectionConfig.ConfigureExternalServices.SplitTableService
|
||||
= (ISplitTableService)Activator.CreateInstance(splitTableAttribute.CustomSplitTableService);
|
||||
}
|
||||
if (
|
||||
context?.CurrentConnectionConfig?.ConfigureExternalServices?.SplitTableService !=null
|
||||
&& splitTableAttribute.CustomSplitTableService == null
|
||||
&& context.EntityMaintenance.GetEntityInfo(entityType).DbTableName?.EndsWith("_{year}{month}{day}") ==true
|
||||
)
|
||||
{
|
||||
context.CurrentConnectionConfig.ConfigureExternalServices.SplitTableService
|
||||
= null;
|
||||
}
|
||||
}
|
||||
public static void ConvertParameter(SugarParameter p, ISqlBuilder builder)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user