diff --git a/src/2.services/ATS.NonCustodial.Application/Impl/Admins/SMSService.cs b/src/2.services/ATS.NonCustodial.Application/Impl/Admins/SMSService.cs
index f926ee9..069b5e4 100644
--- a/src/2.services/ATS.NonCustodial.Application/Impl/Admins/SMSService.cs
+++ b/src/2.services/ATS.NonCustodial.Application/Impl/Admins/SMSService.cs
@@ -98,6 +98,27 @@ namespace ATS.NonCustodial.Application.Impl.Admins
return ResultOutput.Ok(true);
}
+ ///
+ /// 给指定电话发送短信
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task SendMessageSMS(string phone, string msg = "", string type = "CheckCode")
+ {
+ // 检查是否可以发送(一分钟内只能发送一次)
+ if (!await CanSendCodeAsync(phone))
+ {
+ return ResultOutput.NotOk("请求过于频繁,请稍后再试");
+ }
+ // 发送短信
+ var sendResult = SendSMS(phone, msg);
+
+
+ return ResultOutput.Ok(true);
+ }
+
///
/// 校验验证码
diff --git a/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppManagementService.cs b/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppManagementService.cs
index 6d5a12e..7a2e234 100644
--- a/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppManagementService.cs
+++ b/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppManagementService.cs
@@ -24,6 +24,7 @@ using ATS.NonCustodial.Application.Contracts.Interfaces.Business.MaterialManager
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.PunchRecordServices;
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.PunchRecordServices.Input;
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.PunchRecordServices.Output;
+using ATS.NonCustodial.Application.Impl.Admins;
using ATS.NonCustodial.Application.Impl.Business.IM;
using ATS.NonCustodial.Domain.Entities.Admins;
using ATS.NonCustodial.Domain.Entities.Business;
@@ -839,7 +840,12 @@ namespace ATS.NonCustodial.Application.Impl.Business
///
///
[HttpPost]
- public async Task AddAppBusinessAsync(AppBusinessApplicationCreateOrModifyInput input) => await _appBusinessApplicationService.CreateOrModify(input);
+ public async Task AddAppBusinessAsync(AppBusinessApplicationCreateOrModifyInput input)
+ {
+ //测试发短信流程
+ // await _smsService.SendMessageSMS("13461916012","您有一条申请待处理,请及时处理");
+ return await _appBusinessApplicationService.CreateOrModify(input);
+ }
///
/// 获取被监管人员业务申请列表(正在进行的案件)
@@ -987,8 +993,8 @@ namespace ATS.NonCustodial.Application.Impl.Business
[AllowAnonymous]
public async Task SubmitBindingApplication(SubmitBindingApplicationInput input)
{
- bool checkCode = await _smsService.CheckCodeAsync(input.phone, input.checkCode, "CheckCode");
- if (!checkCode) return ResultOutput.NotOk("无效验证码");
+ // bool checkCode = await _smsService.CheckCodeAsync(input.phone, input.checkCode, "CheckCode");
+ // if (!checkCode) return ResultOutput.NotOk("无效验证码");
//[1]校验当前账户是否是第一次绑定
//if (!await _appSupervisedPersonRepository.AnyAsync(w => w.IdCard == input.IdCard && !w.IsBound)) return ResultOutput.NotOk("当前身份没有被监管,请检查身份证是否输入正确");
diff --git a/src/3.contracts/ATS.NonCustodial.Application.Contracts/Interfaces/Admins/SMS/ISMSService.cs b/src/3.contracts/ATS.NonCustodial.Application.Contracts/Interfaces/Admins/SMS/ISMSService.cs
index f9d3fcd..7b3e39f 100644
--- a/src/3.contracts/ATS.NonCustodial.Application.Contracts/Interfaces/Admins/SMS/ISMSService.cs
+++ b/src/3.contracts/ATS.NonCustodial.Application.Contracts/Interfaces/Admins/SMS/ISMSService.cs
@@ -24,7 +24,14 @@ namespace ATS.NonCustodial.Application.Contracts.Interfaces.Admins.SMS
///
///
Task CheckCodeAsync(string phoneNumber, string code, string type = "default");
-
+ ///
+ /// 给指定电话发送短信
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task SendMessageSMS(string phone, string msg = "", string type = "CheckCode");
///
/// 发送前校验