Synchronization code

This commit is contained in:
sunkaixuan
2023-09-02 13:49:47 +08:00
parent e561d30c75
commit 42542f3456

View File

@@ -600,7 +600,7 @@ namespace SqlSugar
} }
private void After(string sql) private void After(string sql)
{ {
if (this.IsEnableDiffLogEvent) if (this.IsEnableDiffLogEvent && !string.IsNullOrEmpty(sql))
{ {
var isDisableMasterSlaveSeparation = this.Ado.IsDisableMasterSlaveSeparation; var isDisableMasterSlaveSeparation = this.Ado.IsDisableMasterSlaveSeparation;
this.Ado.IsDisableMasterSlaveSeparation = true; this.Ado.IsDisableMasterSlaveSeparation = true;
@@ -650,7 +650,7 @@ namespace SqlSugar
} }
private void Before(string sql) private void Before(string sql)
{ {
if (this.IsEnableDiffLogEvent) if (this.IsEnableDiffLogEvent&&!string.IsNullOrEmpty(sql))
{ {
var isDisableMasterSlaveSeparation = this.Ado.IsDisableMasterSlaveSeparation; var isDisableMasterSlaveSeparation = this.Ado.IsDisableMasterSlaveSeparation;
this.Ado.IsDisableMasterSlaveSeparation = true; this.Ado.IsDisableMasterSlaveSeparation = true;