This commit is contained in:
2025-12-15 13:04:44 +08:00
parent 9edff983d8
commit 9b8bf43eb6
2 changed files with 15 additions and 7 deletions

View File

@@ -1,9 +1,7 @@
using Atomx.Data;
using Atomx.Data.CacheServices;
using Hangfire;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;
namespace Atomx.Core.Jos
{
@@ -19,7 +17,20 @@ namespace Atomx.Core.Jos
_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);
// 在这里添加发送验证码的具体任务逻辑