bug处理

This commit is contained in:
2024-04-23 10:16:16 +08:00
parent c8e2f1eafd
commit 579f2d3a39
197 changed files with 2509 additions and 1363 deletions

View File

@@ -1,8 +1,6 @@
using System.Text.RegularExpressions;
using JNPF.Common.Configuration;
using JNPF.Common.Configuration;
using JNPF.DependencyInjection;
using JNPF.EventBus;
using JNPF.VisualDev.Entitys;
using SqlSugar;
namespace JNPF.EventHandler;
@@ -44,18 +42,7 @@ public class LogEventSubscriber : IEventSubscriber, ISingleton
_sqlSugarClient.ChangeDatabase(log.ConnectionConfig.ConfigId);
}
string pattern = @"^[0-9]*$";
var db = _sqlSugarClient.CopyNew();
if (!string.IsNullOrEmpty(log.Entity.ModuleId) && new Regex(pattern).IsMatch(log.Entity.ModuleId))
{
var module = await db.Queryable<VisualDevEntity>().Where(x => x.Id == log.Entity.ModuleId).FirstAsync();
if (module != null)
{
log.Entity.ModuleName = module.FullName;
}
}
await db.Insertable(log.Entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
await _sqlSugarClient.CopyNew().Insertable(log.Entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
}
/// <summary>