diff --git a/BPA.SAAS.Manage.Application/Auth/AuthService.cs b/BPA.SAAS.Manage.Application/Auth/AuthService.cs
index 50efa8e..5e5468a 100644
--- a/BPA.SAAS.Manage.Application/Auth/AuthService.cs
+++ b/BPA.SAAS.Manage.Application/Auth/AuthService.cs
@@ -206,13 +206,29 @@ namespace BPA.SAAS.Manage.Application.Auth
{
throw Oops.Oh("授权信息不存在");
}
- data.Key = Guid.NewGuid().ToString();
data.PeriodValidity = input.PeriodValidity;
data.UpdateAt = DateTime.Now;
return await _db.Updateable(data).ExecuteCommandHasChangeAsync();
}
+ ///
+ /// 删除授权码
+ ///
+ ///
+ ///
+ [HttpPost("/api/authorization/delauthorization")]
+ public async Task DelAuthorization(string id)
+ {
+ var data = await _db.Queryable().FirstAsync(x => x.Id == id);
+ if (data == null)
+ {
+ throw Oops.Oh("授权信息不存在");
+ }
+
+ return await _db.Deleteable(data).ExecuteCommandHasChangeAsync();
+ }
+
#endregion
}
}
diff --git a/BPA.SAAS.Manage.Application/Auth/IAuthService.cs b/BPA.SAAS.Manage.Application/Auth/IAuthService.cs
index c00834e..784417c 100644
--- a/BPA.SAAS.Manage.Application/Auth/IAuthService.cs
+++ b/BPA.SAAS.Manage.Application/Auth/IAuthService.cs
@@ -44,6 +44,14 @@ namespace BPA.SAAS.Manage.Application.Auth
///
Task UpdateAuthTime(CreateOrUpDatePlatformAuthorizationDto input);
+
+ ///
+ /// 删除授权
+ ///
+ ///
+ ///
+ Task DelAuthorization(string id);
+
#endregion
}
}