From 755713aeb9c421f8828d0b5596f4cfc1b8a924b0 Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Thu, 11 Jul 2024 16:59:02 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E7=9F=AD?=
=?UTF-8?q?=E4=BF=A1=E4=BF=AE=E6=94=B9=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AliyunSms.cs | 25 ++++++-------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/AliyunSms.cs b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/AliyunSms.cs
index 745463b7e..16de654bb 100644
--- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/AliyunSms.cs
+++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/AliyunSms.cs
@@ -10,7 +10,7 @@ using Newtonsoft.Json;
namespace Quanjiang.DigitalScholl.SendSms
{
- public class AliyunSms:ISms
+ public class AliyunSms : ISms
{
private static readonly string RegionIdForPop = ConfigManager.AppSettings["regionIdForPop"].Value;
private static readonly string AccessId = ConfigManager.AppSettings["accessId"].Value;
@@ -25,9 +25,9 @@ namespace Quanjiang.DigitalScholl.SendSms
/// 手机号
/// 短信通知类型
/// 发送结果
- public async Task<(string code,string randomNum, string message,string errorType)> SendSmsToSingle(string phoneNumber, SmsType st, List sendParams = null)
+ public async Task<(string code, string randomNum, string message, string errorType)> SendSmsToSingle(string phoneNumber, SmsType st, List sendParams = null)
{
- (string code, string randomNum, string message,string errorType) result;
+ (string code, string randomNum, string message, string errorType) result;
IClientProfile profile = DefaultProfile.GetProfile(RegionIdForPop, AccessId, AccessSecret);
DefaultProfile.AddEndpoint(RegionIdForPop, RegionIdForPop, Product, Domain);
IAcsClient acsClient = new DefaultAcsClient(profile);
@@ -40,15 +40,15 @@ namespace Quanjiang.DigitalScholl.SendSms
request.TemplateCode = templatecode;
request.TemplateParam = templateparam;
var sendSmsResponse = await Task.FromResult(acsClient.GetAcsResponse(request));
- result=(sendSmsResponse.Code, randomNum, sendSmsResponse.Message,"");
+ result = (sendSmsResponse.Code, randomNum, sendSmsResponse.Message, "");
}
catch (ServerException e)
{
- result = (e.ErrorCode,"",e.ErrorMessage,Enum.GetName(typeof(ErrorType),e.ErrorType));
+ result = (e.ErrorCode, "", e.ErrorMessage, Enum.GetName(typeof(ErrorType), e.ErrorType));
}
catch (ClientException e)
{
- result = (e.ErrorCode,"", e.ErrorMessage, Enum.GetName(typeof(ErrorType), e.ErrorType));
+ result = (e.ErrorCode, "", e.ErrorMessage, Enum.GetName(typeof(ErrorType), e.ErrorType));
}
return result;
}
@@ -64,9 +64,9 @@ namespace Quanjiang.DigitalScholl.SendSms
///
///
///
- private (string templateCode, string templateParam, string randomNum) GetSmsTemplateBySmsType(SmsType st)
+ private (string templateCode, string templateParam, string randomNum) GetSmsTemplateBySmsType(SmsType st)
{
- (string templateCode, string templateParam,string randomNum) result;
+ (string templateCode, string templateParam, string randomNum) result;
var randomNum = CommonHelper.RandNum(6);
switch (st)
{
@@ -79,15 +79,6 @@ namespace Quanjiang.DigitalScholl.SendSms
case SmsType.ForgetPassWord:
result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum);
break;
- case SmsType.LessionNotification:
- result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum);
- break;
- case SmsType.LeaveNotification:
- result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum);
- break;
- case SmsType.MakeUpMissedLessonsNotification:
- result = ("SMS_137485060", JsonConvert.SerializeObject(new { code = randomNum }), randomNum);
- break;
default:
throw new ArgumentOutOfRangeException(nameof(st), st, null);
}