| | |
| | | using Azure.Core; |
| | | using Furion; |
| | | using Furion.DatabaseAccessor; |
| | | using Furion.FriendlyException; |
| | | using Furion.UnifyResult; |
| | | using Mapster; |
| | | using MediatR; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.Extensions.Hosting; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | entity.TemplateParam = new { code }.ToJson(); |
| | | await aliyunSmsUtils.SendAsync(model.PhoneNumber, model.TemplateCode, entity.TemplateParam, cancellationToken); |
| | | await rep.InsertAsync(entity); |
| | | if (App.HostEnvironment.IsDevelopment()) |
| | | { |
| | | UnifyContext.Fill(new |
| | | { |
| | | Code = code |
| | | }); |
| | | } |
| | | return entity.Id; |
| | | } |
| | | |