25 lines
803 B
C#
25 lines
803 B
C#
using LMS.Common.Extensions;
|
|
using Microsoft.Extensions.Logging;
|
|
using Quartz;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace LMS.Tools.MJPackage
|
|
{
|
|
[DisallowConcurrentExecution]
|
|
public class TokenResetService(ITokenService tokenService, ILogger<TokenResetService> logger) : IJob
|
|
{
|
|
private readonly ITokenService _tokenService = tokenService;
|
|
private readonly ILogger<TokenResetService> _logger = logger;
|
|
public async Task Execute(IJobExecutionContext context)
|
|
{
|
|
_logger.LogInformation("开始每天重置 Token 日使用 统计数据, 执行时间 " + BeijingTimeExtension.GetBeijingTime());
|
|
await _tokenService.ResetDailyUsage();
|
|
}
|
|
|
|
}
|
|
}
|