| | |
| | | private readonly IOptions<ChengLiYeSmsOptions> options = options; |
| | | private readonly IHttpRemoteService httpRemoteService = httpRemoteService; |
| | | |
| | | public async Task<SmsResponse> SendAsync(string phoneNumber, EnumSmsTemplateCode templateCode, object templateParam, CancellationToken cancellationToken) |
| | | public async Task<SmsResponse> SendAsync(string signName, string phoneNumber, EnumSmsTemplateCode templateCode, object templateParam, CancellationToken cancellationToken) |
| | | { |
| | | var content = options.Value.TemplateCodes[templateCode.ToString()]; |
| | | if (templateParam != null) |
| | |
| | | var body = new ChengLiYeSmsSubmitRequest |
| | | { |
| | | UserName = options.Value.UserName, |
| | | Sign = MD5Encryption.Encrypt($"{options.Value.UserName}{options.Value.Password}{phoneNumber}【{options.Value.SignName}】{content}"), |
| | | Sign = MD5Encryption.Encrypt($"{options.Value.UserName}{options.Value.Password}{phoneNumber}【{signName}】{content}"), |
| | | Mobile = phoneNumber, |
| | | Content = $"【{options.Value.SignName}】{content}", |
| | | Content = $"【{signName}】{content}", |
| | | }; |
| | | var log = new ThreeResourceLog |
| | | { |