Skip to content

Commit 5d225ad

Browse files
author
LemonNoCry
committed
⬆️ SqlSugar 5.1.4.158
fix #360
1 parent f400a43 commit 5d225ad

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Blog.Core.Api/Controllers/DbFirst/DbFirstController.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ public MessageModel<string> GetFrameFiles()
4343

4444
BaseDBConfig.ValidConfig.ForEach(m =>
4545
{
46-
_sqlSugarClient.ChangeDatabase(m.ConfigId.ToLower());
47-
data.response += $"库{m.ConfigId}-Model层生成:{FrameSeed.CreateModels(_sqlSugarClient, m.ConfigId, isMuti)} || ";
48-
data.response += $"库{m.ConfigId}-IRepositorys层生成:{FrameSeed.CreateIRepositorys(_sqlSugarClient, m.ConfigId, isMuti)} || ";
49-
data.response += $"库{m.ConfigId}-IServices层生成:{FrameSeed.CreateIServices(_sqlSugarClient, m.ConfigId, isMuti)} || ";
50-
data.response += $"库{m.ConfigId}-Repository层生成:{FrameSeed.CreateRepository(_sqlSugarClient, m.ConfigId, isMuti)} || ";
51-
data.response += $"库{m.ConfigId}-Services层生成:{FrameSeed.CreateServices(_sqlSugarClient, m.ConfigId, isMuti)} || ";
46+
_sqlSugarClient.ChangeDatabase(m.ConfigId.ToString().ToLower());
47+
data.response += $"库{m.ConfigId}-Model层生成:{FrameSeed.CreateModels(_sqlSugarClient, m.ConfigId.ToString(), isMuti)} || ";
48+
data.response += $"库{m.ConfigId}-IRepositorys层生成:{FrameSeed.CreateIRepositorys(_sqlSugarClient, m.ConfigId.ToString(), isMuti)} || ";
49+
data.response += $"库{m.ConfigId}-IServices层生成:{FrameSeed.CreateIServices(_sqlSugarClient, m.ConfigId.ToString(), isMuti)} || ";
50+
data.response += $"库{m.ConfigId}-Repository层生成:{FrameSeed.CreateRepository(_sqlSugarClient, m.ConfigId.ToString(), isMuti)} || ";
51+
data.response += $"库{m.ConfigId}-Services层生成:{FrameSeed.CreateServices(_sqlSugarClient, m.ConfigId.ToString(), isMuti)} || ";
5252
});
5353

5454
// 切回主库

Blog.Core.Extensions/ServiceExtensions/SqlsugarSetup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static void AddSqlsugarSetup(this IServiceCollection services)
6969
}
7070
else
7171
{
72-
if (string.Equals(config.ConfigId, MainDb.CurrentDbConnId,
72+
if (string.Equals(config.ConfigId.ToString(), MainDb.CurrentDbConnId,
7373
StringComparison.CurrentCultureIgnoreCase))
7474
{
7575
BaseDBConfig.MainConfig = config;

Blog.Core.Model/Blog.Core.Model.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<ItemGroup>
1616
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.17" />
17-
<PackageReference Include="sqlSugarCore" Version="5.1.4.115" />
17+
<PackageReference Include="sqlSugarCore" Version="5.1.4.158" />
1818
<PackageReference Include="AutoMapper" Version="12.0.1" />
1919
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
2020
</ItemGroup>

Blog.Core.Tasks/QuartzNet/Jobs/Job_Blogs_Quartz.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Job_Blogs_Quartz(IBlogArticleServices blogArticleServices, ITasksQzServic
3434
/// 直接写就没有锁库 上下文ContextID一样
3535
/// </summary>
3636
/// <param name="context"></param>
37-
public async Task Execute(IJobExecutionContext context)
37+
public async Task Execute2(IJobExecutionContext context)
3838
{
3939
try
4040
{
@@ -81,11 +81,9 @@ await db.Insertable(new PasswordLib()
8181
/// 但是调用其他类方法 上下文ContextID就不一样
8282
/// </summary>
8383
/// <param name="context"></param>
84-
public async Task Execute2(IJobExecutionContext context)
84+
public async Task Execute(IJobExecutionContext context)
8585
{
86-
await _guestbookServices.TestTranPropagationTran3();
87-
88-
//var executeLog = await ExecuteJob(context, async () => await Run(context));
86+
var executeLog = await ExecuteJob(context, async () => await Run(context));
8987
}
9088

9189
public async Task Run(IJobExecutionContext context)
@@ -95,6 +93,8 @@ public async Task Run(IJobExecutionContext context)
9593
// 也可以通过数据库配置,获取传递过来的参数
9694
JobDataMap data = context.JobDetail.JobDataMap;
9795
//int jobId = data.GetInt("JobParam");
96+
97+
await _guestbookServices.TestTranPropagationTran2();
9898
}
9999
}
100100
}

0 commit comments

Comments
 (0)