From 36f2ee0a5da0fe64d3b2fdbefecc8bd65f05bc72 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 10 Mar 2025 09:54:06 +0800 Subject: [PATCH] 1 --- .../HostedService/QuartzJobHostedService.cs | 2 +- .../Ghre/Ghre_ExamRecordServices.cs | 24 +++++++++++++++---- .../Jobs/Job_AutoIssueCertificate_Quartz.cs | 1 + 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Tiobon.Core.Extensions/HostedService/QuartzJobHostedService.cs b/Tiobon.Core.Extensions/HostedService/QuartzJobHostedService.cs index a19cb024..3359833e 100644 --- a/Tiobon.Core.Extensions/HostedService/QuartzJobHostedService.cs +++ b/Tiobon.Core.Extensions/HostedService/QuartzJobHostedService.cs @@ -21,7 +21,7 @@ public class QuartzJobHostedService : IHostedService public async Task StartAsync(CancellationToken cancellationToken) { - _logger.LogInformation("Start QuartzJob Service!"); + _logger.LogInformation("---Start QuartzJob Service!"); await DoWork(); } diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs index afd516bc..7a851bf8 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs @@ -1,4 +1,5 @@ using AgileObjects.AgileMapper.Extensions; +using Microsoft.Extensions.Logging; using MongoDB.Driver.Linq; using System.Net; using System.Text.RegularExpressions; @@ -13,14 +14,16 @@ public class Ghre_ExamRecordServices : BaseServices _dal; //private readonly IGhre_ExamPaperServices _ghre_ExamPaperServices; + private readonly ILogger _logger; public Ghre_ExamRecordServices(ICaching caching, //IGhre_ExamPaperServices ghre_ExamPaperServices, - IBaseRepository dal) + IBaseRepository dal, ILogger logger) { this._dal = dal; base.BaseDal = dal; base._caching = caching; //_ghre_ExamPaperServices = ghre_ExamPaperServices; + _logger = logger; } public override async Task> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) @@ -1463,6 +1466,7 @@ public class Ghre_ExamRecordServices : BaseServices new { it.IsIssueCertificate }, true) .ExecuteCommandAsync(); diff --git a/Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoIssueCertificate_Quartz.cs b/Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoIssueCertificate_Quartz.cs index d02f18d3..df1b1ffa 100644 --- a/Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoIssueCertificate_Quartz.cs +++ b/Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoIssueCertificate_Quartz.cs @@ -32,5 +32,6 @@ public class Job_AutoIssueCertificate_Quartz : JobBase, IJob { if (jobid > 0) await _services.IssueCertificate(); + } }