using FlexJobApi.Core;
using Mapster;
using MediatR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FlexJobApi.UserServer.Application
{
///
/// 验证码命令处理器
///
public class VerifyCodeCommandHandler
: IRequestHandler
{
///
/// 发送验证码
///
///
///
///
public Task Handle(SendVerifyCodeCommand request, CancellationToken cancellationToken)
{
throw new Exception();
//var callback = new FriendlyEmptyCallback();
//var code = new Random().Next(100000, 999999).ToString();
//var entity = new SmsLog();
//request.Adapt(entity);
//entity.Expiry = DateTime.Now.AddMinutes(30);
//entity.TemplateParam = new { code }.ToJson();
//await utils.SendAsync(request.PhoneNumber, request.TemplateCode, entity.TemplateParam, cancellationToken);
//rep.Add(entity);
//await rep.SaveChangesAsync(cancellationToken);
//return new FriendlyEmptyCallback("验证码已发送,请查收");
}
}
}