修复SqlSugarSetup类名修改后,nlog不打印日志问题,日期时间转换类增加格式,暂存区块和字段关联

This commit is contained in:
2023-10-11 16:58:48 +08:00
parent e6dae7d1e2
commit 28c53b71ce
14 changed files with 118 additions and 82 deletions
@@ -170,7 +170,7 @@ namespace Infrastructure.Extensions
{
try
{
return bool.Parse(str.ToString());
return bool.Parse(str.ToString() ?? string.Empty);
}
catch
{
@@ -284,6 +284,9 @@ namespace Infrastructure.Extensions
return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture);
case 12:
return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture);
case 13:
return DateTime.ParseExact(str, "yyyy.MM.dd ddd",
System.Globalization.CultureInfo.CurrentCulture);
case 14:
return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
default: