|
@@ -358,9 +358,16 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
|
[HttpPost]
|
|
|
[AllowAnonymous]
|
|
|
[NoOprationLog]
|
|
|
- public string SendCode(string phone)
|
|
|
+ public string SendCode(SendCodeInput input)
|
|
|
{
|
|
|
- //= new ISmsRepository();
|
|
|
+ string phone = input.Phone;
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty(phone))
|
|
|
+ {
|
|
|
+ throw ResultOutput.Exception(string.Format("手机号不可为空"));
|
|
|
+ }
|
|
|
+
|
|
|
+ //= new ISmsRepository();
|
|
|
var result = _smsRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
|
|
|
.Where(a => a.Mobile == phone && a.Status == 0 && a.CreatedTime >= DateTime.Now.AddMinutes(-2))
|
|
|
.First(a => new
|