chore
This commit is contained in:
@@ -15,7 +15,6 @@ using Blazored.LocalStorage;
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using Hangfire;
|
using Hangfire;
|
||||||
using Hangfire.PostgreSql;
|
using Hangfire.PostgreSql;
|
||||||
using Hangfire.PostgreSql.Factories;
|
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Components.Authorization;
|
using Microsoft.AspNetCore.Components.Authorization;
|
||||||
@@ -23,9 +22,7 @@ using Microsoft.AspNetCore.HttpOverrides;
|
|||||||
using Microsoft.AspNetCore.Localization;
|
using Microsoft.AspNetCore.Localization;
|
||||||
using Microsoft.AspNetCore.ResponseCompression;
|
using Microsoft.AspNetCore.ResponseCompression;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
using Npgsql;
|
|
||||||
using Scalar.AspNetCore;
|
using Scalar.AspNetCore;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using Atomx.Data;
|
using Atomx.Data;
|
||||||
using Atomx.Data.CacheServices;
|
using Atomx.Data.CacheServices;
|
||||||
|
using Hangfire;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Atomx.Core.Jos
|
namespace Atomx.Core.Jos
|
||||||
{
|
{
|
||||||
@@ -19,7 +17,20 @@ namespace Atomx.Core.Jos
|
|||||||
_cacheService = cacheService;
|
_cacheService = cacheService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Execute(string email, string code)
|
/// <summary>
|
||||||
|
/// 发送短信验证码任务
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="phone"></param>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
[AutomaticRetry(Attempts = 3, OnAttemptsExceeded = AttemptsExceededAction.Delete)]
|
||||||
|
[DisableConcurrentExecution(60)]
|
||||||
|
public void SendSMSCode(string phone, string code)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("SendVerificationCodeJob executed at: {time}", DateTimeOffset.Now);
|
||||||
|
// 在这里添加发送验证码的具体任务逻辑
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendEmailCode(string email, string code)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("SendVerificationCodeJob executed at: {time}", DateTimeOffset.Now);
|
_logger.LogInformation("SendVerificationCodeJob executed at: {time}", DateTimeOffset.Now);
|
||||||
// 在这里添加发送验证码的具体任务逻辑
|
// 在这里添加发送验证码的具体任务逻辑
|
||||||
|
|||||||
Reference in New Issue
Block a user