diff --git a/Tiobon.Core.Api/Controllers/BlogController.cs b/Tiobon.Core.Api/Controllers/BlogController.cs
index 5eb36083..6645d9a2 100644
--- a/Tiobon.Core.Api/Controllers/BlogController.cs
+++ b/Tiobon.Core.Api/Controllers/BlogController.cs
@@ -1,5 +1,4 @@
-using Tiobon.Core.SwaggerHelper;
-using Serilog;
+using Serilog;
using StackExchange.Profiling;
using static Tiobon.Core.Extensions.CustomApiVersion;
@@ -9,7 +8,7 @@ namespace Tiobon.Core.Controllers
/// 博客管理
///
[Produces("application/json")]
- [Route("api/Tiobon")]
+ [Route("api/Tiobon"), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class TiobonController : BaseApiController
{
public ITiobonArticleServices _TiobonArticleServices { get; set; }
diff --git a/Tiobon.Core.Api/Controllers/DbFirst/DbFirstController.cs b/Tiobon.Core.Api/Controllers/DbFirst/DbFirstController.cs
index e588e6d1..624f3e2f 100644
--- a/Tiobon.Core.Api/Controllers/DbFirst/DbFirstController.cs
+++ b/Tiobon.Core.Api/Controllers/DbFirst/DbFirstController.cs
@@ -1,17 +1,11 @@
-using Tiobon.Core.Common;
-using Tiobon.Core.Common.DB;
+using Tiobon.Core.Common.DB;
using Tiobon.Core.Common.Seed;
-using Tiobon.Core.Model;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Hosting;
using SqlSugar;
-using System.Linq;
namespace Tiobon.Core.Controllers
{
[Route("api/[controller]/[action]")]
- [ApiController]
+ [ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Assistant)]
//[Authorize(Permissions.Name)]
public class DbFirstController : ControllerBase
{
diff --git a/Tiobon.Core.Api/Controllers/DbFirst/MigrateController.cs b/Tiobon.Core.Api/Controllers/DbFirst/MigrateController.cs
index 9666e262..2c69e503 100644
--- a/Tiobon.Core.Api/Controllers/DbFirst/MigrateController.cs
+++ b/Tiobon.Core.Api/Controllers/DbFirst/MigrateController.cs
@@ -1,25 +1,10 @@
-using Tiobon.Core.Common.Helper;
-using Tiobon.Core.IServices;
-using Tiobon.Core.Model;
-using Tiobon.Core.Model.Models;
-using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Hosting;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tiobon.Core.Repository.UnitOfWorks;
namespace Tiobon.Core.Controllers
{
[Route("api/[controller]/[action]")]
- [ApiController]
+ [ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Assistant)]
//[Authorize(Permissions.Name)]
public class MigrateController : ControllerBase
{
diff --git a/Tiobon.Core.Api/Controllers/DepartmentController.cs b/Tiobon.Core.Api/Controllers/DepartmentController.cs
index d76d500b..2e590bf3 100644
--- a/Tiobon.Core.Api/Controllers/DepartmentController.cs
+++ b/Tiobon.Core.Api/Controllers/DepartmentController.cs
@@ -2,7 +2,7 @@
{
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class DepartmentController : BaseApiController
{
private readonly IDepartmentServices _departmentServices;
diff --git a/Tiobon.Core.Api/Controllers/HealthCheckController.cs b/Tiobon.Core.Api/Controllers/HealthCheckController.cs
index d0718456..2ee3fcd9 100644
--- a/Tiobon.Core.Api/Controllers/HealthCheckController.cs
+++ b/Tiobon.Core.Api/Controllers/HealthCheckController.cs
@@ -4,7 +4,7 @@
/// 健康检查
///
[Route("[controller]")]
- [ApiController]
+ [ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class HealthCheckController : ControllerBase
{
///
diff --git a/Tiobon.Core.Api/Controllers/ImgController.cs b/Tiobon.Core.Api/Controllers/ImgController.cs
index aa6f6749..8e0759bd 100644
--- a/Tiobon.Core.Api/Controllers/ImgController.cs
+++ b/Tiobon.Core.Api/Controllers/ImgController.cs
@@ -5,7 +5,7 @@
///
[Route("api/[controller]")]
[ApiController]
- [Authorize]
+ [Authorize, ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class ImgController : BaseApiController
{
diff --git a/Tiobon.Core.Api/Controllers/LoginController.cs b/Tiobon.Core.Api/Controllers/LoginController.cs
index 42f54f80..83884c07 100644
--- a/Tiobon.Core.Api/Controllers/LoginController.cs
+++ b/Tiobon.Core.Api/Controllers/LoginController.cs
@@ -12,7 +12,7 @@ namespace Tiobon.Core.Controllers
/// 登录管理【无权限】
///
[Produces("application/json")]
- [Route("api/Login")]
+ [Route("api/Login"), ApiExplorerSettings(GroupName = Grouping.GroupName_Auth)]
[AllowAnonymous]
public class LoginController : BaseApiController
{
diff --git a/Tiobon.Core.Api/Controllers/ModuleController.cs b/Tiobon.Core.Api/Controllers/ModuleController.cs
index d0461a31..879e006d 100644
--- a/Tiobon.Core.Api/Controllers/ModuleController.cs
+++ b/Tiobon.Core.Api/Controllers/ModuleController.cs
@@ -5,7 +5,7 @@
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class ModuleController : BaseApiController
{
readonly IModuleServices _moduleServices;
diff --git a/Tiobon.Core.Api/Controllers/MonitorController.cs b/Tiobon.Core.Api/Controllers/MonitorController.cs
index fbb25f41..391c0ac9 100644
--- a/Tiobon.Core.Api/Controllers/MonitorController.cs
+++ b/Tiobon.Core.Api/Controllers/MonitorController.cs
@@ -8,7 +8,7 @@ namespace Tiobon.Core.Controllers
{
[Route("api/[Controller]/[action]")]
[ApiController]
- [AllowAnonymous]
+ [AllowAnonymous, ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class MonitorController : BaseApiController
{
private readonly IHubContext _hubContext;
diff --git a/Tiobon.Core.Api/Controllers/NacosController.cs b/Tiobon.Core.Api/Controllers/NacosController.cs
index 08a2828b..a36cc158 100644
--- a/Tiobon.Core.Api/Controllers/NacosController.cs
+++ b/Tiobon.Core.Api/Controllers/NacosController.cs
@@ -7,7 +7,7 @@ namespace Tiobon.Core.Api.Controllers
///
[Produces("application/json")]
[Route("api/[Controller]/[action]")]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class NacosController : BaseApiController
{
diff --git a/Tiobon.Core.Api/Controllers/PayController.cs b/Tiobon.Core.Api/Controllers/PayController.cs
index 3d14a9fe..43de2918 100644
--- a/Tiobon.Core.Api/Controllers/PayController.cs
+++ b/Tiobon.Core.Api/Controllers/PayController.cs
@@ -5,7 +5,7 @@
///
[Produces("application/json")]
[Route("api/Pay")]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class PayController : Controller
{
private readonly ILogger _logger;
diff --git a/Tiobon.Core.Api/Controllers/PermissionController.cs b/Tiobon.Core.Api/Controllers/PermissionController.cs
index de6135fd..46df30a1 100644
--- a/Tiobon.Core.Api/Controllers/PermissionController.cs
+++ b/Tiobon.Core.Api/Controllers/PermissionController.cs
@@ -10,7 +10,7 @@ namespace Tiobon.Core.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class PermissionController : BaseApiController
{
readonly IUnitOfWorkManage _unitOfWorkManage;
diff --git a/Tiobon.Core.Api/Controllers/RoleController.cs b/Tiobon.Core.Api/Controllers/RoleController.cs
index f60fe08a..db2c9902 100644
--- a/Tiobon.Core.Api/Controllers/RoleController.cs
+++ b/Tiobon.Core.Api/Controllers/RoleController.cs
@@ -5,7 +5,7 @@
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class RoleController : BaseApiController
{
readonly IRoleServices _roleServices;
diff --git a/Tiobon.Core.Api/Controllers/SignalRTestController.cs b/Tiobon.Core.Api/Controllers/SignalRTestController.cs
index 7429cae2..87dab3e5 100644
--- a/Tiobon.Core.Api/Controllers/SignalRTestController.cs
+++ b/Tiobon.Core.Api/Controllers/SignalRTestController.cs
@@ -8,7 +8,7 @@ namespace Tiobon.Core.Api.Controllers;
///
[Route("api/[controller]/[action]")]
[ApiController]
-[Authorize]
+[Authorize, ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class SignalRTestController : BaseApiController
{
private readonly IHubContext _hubContext;
diff --git a/Tiobon.Core.Api/Controllers/SplitDemoController.cs b/Tiobon.Core.Api/Controllers/SplitDemoController.cs
index 401a7594..81015a94 100644
--- a/Tiobon.Core.Api/Controllers/SplitDemoController.cs
+++ b/Tiobon.Core.Api/Controllers/SplitDemoController.cs
@@ -5,7 +5,7 @@
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class SplitDemoController : ControllerBase
{
readonly ISplitDemoServices splitDemoServices;
diff --git a/Tiobon.Core.Api/Controllers/Systems/CacheManageController.cs b/Tiobon.Core.Api/Controllers/Systems/CacheManageController.cs
index 6a690b6d..a5dd1e26 100644
--- a/Tiobon.Core.Api/Controllers/Systems/CacheManageController.cs
+++ b/Tiobon.Core.Api/Controllers/Systems/CacheManageController.cs
@@ -1,81 +1,76 @@
using Tiobon.Core.Common.Caches;
-using Tiobon.Core.Controllers;
-using Tiobon.Core.Model;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-
namespace Tiobon.Core.Api.Controllers.Systems;
///
/// 缓存管理
///
[Route("api/Systems/[controller]")]
-[ApiController]
+[ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Assistant)]
[Authorize(Permissions.Name)]
public class CacheManageController : BaseApiController
{
- private readonly ICaching _caching;
+ private readonly ICaching _caching;
- public CacheManageController(ICaching caching)
- {
- _caching = caching;
- }
+ public CacheManageController(ICaching caching)
+ {
+ _caching = caching;
+ }
- ///
- /// 获取全部缓存
- ///
- ///
- [HttpGet]
- public async Task>> Get()
- {
- return Success(await _caching.GetAllCacheKeysAsync());
- }
+ ///
+ /// 获取全部缓存
+ ///
+ ///
+ [HttpGet]
+ public async Task>> Get()
+ {
+ return Success(await _caching.GetAllCacheKeysAsync());
+ }
- ///
- /// 获取缓存
- ///
- ///
- [HttpGet("{key}")]
- public async Task> Get(string key)
- {
- return Success(await _caching.GetStringAsync(key));
- }
+ ///
+ /// 获取缓存
+ ///
+ ///
+ [HttpGet("{key}")]
+ public async Task> Get(string key)
+ {
+ return Success(await _caching.GetStringAsync(key));
+ }
- ///
- /// 新增
- ///
- ///
- [HttpPost]
- public async Task Post([FromQuery] string key, [FromQuery] string value, [FromQuery] int? expire)
- {
- if (expire.HasValue)
- await _caching.SetStringAsync(key, value, TimeSpan.FromMilliseconds(expire.Value));
- else
- await _caching.SetStringAsync(key, value);
+ ///
+ /// 新增
+ ///
+ ///
+ [HttpPost]
+ public async Task Post([FromQuery] string key, [FromQuery] string value, [FromQuery] int? expire)
+ {
+ if (expire.HasValue)
+ await _caching.SetStringAsync(key, value, TimeSpan.FromMilliseconds(expire.Value));
+ else
+ await _caching.SetStringAsync(key, value);
- return Success();
- }
+ return Success();
+ }
- ///
- /// 删除全部缓存
- ///
- ///
- [HttpDelete]
- public async Task Delete()
- {
- await _caching.RemoveAllAsync();
- return Success();
- }
+ ///
+ /// 删除全部缓存
+ ///
+ ///
+ [HttpDelete]
+ public async Task Delete()
+ {
+ await _caching.RemoveAllAsync();
+ return Success();
+ }
- ///
- /// 删除缓存
- ///
- ///
- [Route("{key}")]
- [HttpDelete]
- public async Task Delete(string key)
- {
- await _caching.RemoveAsync(key);
- return Success();
- }
+ ///
+ /// 删除缓存
+ ///
+ ///
+ [Route("{key}")]
+ [HttpDelete]
+ public async Task Delete(string key)
+ {
+ await _caching.RemoveAsync(key);
+ return Success();
+ }
}
\ No newline at end of file
diff --git a/Tiobon.Core.Api/Controllers/Systems/DataBaseController.cs b/Tiobon.Core.Api/Controllers/Systems/DataBaseController.cs
index a327d0aa..71179c53 100644
--- a/Tiobon.Core.Api/Controllers/Systems/DataBaseController.cs
+++ b/Tiobon.Core.Api/Controllers/Systems/DataBaseController.cs
@@ -1,14 +1,8 @@
using System.Diagnostics.CodeAnalysis;
-using Tiobon.Core.Common;
using Tiobon.Core.Common.DB;
-using Tiobon.Core.Controllers;
-using Tiobon.Core.Model;
-using Tiobon.Core.Model.Models;
using Tiobon.Core.Model.Systems.DataBase;
using Tiobon.Core.Model.Tenants;
using Mapster;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
using SqlSugar;
namespace Tiobon.Core.Api.Controllers.Systems;
@@ -17,7 +11,7 @@ namespace Tiobon.Core.Api.Controllers.Systems;
/// 数据库管理
///
[Route("api/Systems/[controller]/[action]")]
-[ApiController]
+[ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Assistant)]
[Authorize(Permissions.Name)]
public class DataBaseController : BaseApiController
{
diff --git a/Tiobon.Core.Api/Controllers/Systems/DynamicCodeFirstController.cs b/Tiobon.Core.Api/Controllers/Systems/DynamicCodeFirstController.cs
index 0e0f9f41..55be6cfd 100644
--- a/Tiobon.Core.Api/Controllers/Systems/DynamicCodeFirstController.cs
+++ b/Tiobon.Core.Api/Controllers/Systems/DynamicCodeFirstController.cs
@@ -1,11 +1,5 @@
using Tiobon.Core.Common.DB.Extension;
-using Tiobon.Core.Controllers;
-using Tiobon.Core.Model;
using Tiobon.Core.Model.Models.RootTkey;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using NetTaste;
-using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using SqlSugar;
namespace Tiobon.Core.Api.Controllers.Systems;
@@ -14,7 +8,7 @@ namespace Tiobon.Core.Api.Controllers.Systems;
/// 动态建表 CURD
///
[Route("api/Systems/[controller]/[action]")]
-[ApiController]
+[ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Assistant)]
[Authorize(Permissions.Name)]
public class DynamicCodeFirstController : BaseApiController
{
diff --git a/Tiobon.Core.Api/Controllers/TasksQzController.cs b/Tiobon.Core.Api/Controllers/TasksQzController.cs
index 296615ce..d591eac2 100644
--- a/Tiobon.Core.Api/Controllers/TasksQzController.cs
+++ b/Tiobon.Core.Api/Controllers/TasksQzController.cs
@@ -6,7 +6,7 @@ namespace Tiobon.Core.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class TasksQzController : ControllerBase
{
private readonly ITasksQzServices _tasksQzServices;
diff --git a/Tiobon.Core.Api/Controllers/Tenant/TenantByDbController.cs b/Tiobon.Core.Api/Controllers/Tenant/TenantByDbController.cs
index 93a9b977..0b480eca 100644
--- a/Tiobon.Core.Api/Controllers/Tenant/TenantByDbController.cs
+++ b/Tiobon.Core.Api/Controllers/Tenant/TenantByDbController.cs
@@ -1,10 +1,4 @@
-using Tiobon.Core.Common.HttpContextUser;
-using Tiobon.Core.Controllers;
-using Tiobon.Core.IServices.BASE;
-using Tiobon.Core.Model;
-using Tiobon.Core.Model.Models;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
+using Tiobon.Core.IServices.BASE;
namespace Tiobon.Core.Api.Controllers.Tenant;
@@ -13,7 +7,7 @@ namespace Tiobon.Core.Api.Controllers.Tenant;
///
[Produces("application/json")]
[Route("api/Tenant/ByDb")]
-[Authorize]
+[Authorize, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class TenantByDbController : BaseApiController
{
private readonly IBaseServices _services;
diff --git a/Tiobon.Core.Api/Controllers/Tenant/TenantByIdController.cs b/Tiobon.Core.Api/Controllers/Tenant/TenantByIdController.cs
index dd159582..b41e3b24 100644
--- a/Tiobon.Core.Api/Controllers/Tenant/TenantByIdController.cs
+++ b/Tiobon.Core.Api/Controllers/Tenant/TenantByIdController.cs
@@ -1,10 +1,4 @@
-using Tiobon.Core.Common.HttpContextUser;
-using Tiobon.Core.Controllers;
-using Tiobon.Core.IServices.BASE;
-using Tiobon.Core.Model;
-using Tiobon.Core.Model.Models;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
+using Tiobon.Core.IServices.BASE;
namespace Tiobon.Core.Api.Controllers.Tenant;
@@ -13,7 +7,7 @@ namespace Tiobon.Core.Api.Controllers.Tenant;
///
[Produces("application/json")]
[Route("api/Tenant/ById")]
-[Authorize]
+[Authorize, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class TenantByIdController : BaseApiController
{
private readonly IBaseServices _services;
diff --git a/Tiobon.Core.Api/Controllers/Tenant/TenantByTableController.cs b/Tiobon.Core.Api/Controllers/Tenant/TenantByTableController.cs
index 28938261..1bfffeeb 100644
--- a/Tiobon.Core.Api/Controllers/Tenant/TenantByTableController.cs
+++ b/Tiobon.Core.Api/Controllers/Tenant/TenantByTableController.cs
@@ -1,10 +1,4 @@
-using Tiobon.Core.Common.HttpContextUser;
-using Tiobon.Core.Controllers;
-using Tiobon.Core.IServices.BASE;
-using Tiobon.Core.Model;
-using Tiobon.Core.Model.Models;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
+using Tiobon.Core.IServices.BASE;
namespace Tiobon.Core.Api.Controllers.Tenant;
@@ -13,7 +7,7 @@ namespace Tiobon.Core.Api.Controllers.Tenant;
///
[Produces("application/json")]
[Route("api/Tenant/ByTable")]
-[Authorize]
+[Authorize, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class TenantByTableController : BaseApiController
{
private readonly IBaseServices _services;
diff --git a/Tiobon.Core.Api/Controllers/Tenant/TenantManagerController.cs b/Tiobon.Core.Api/Controllers/Tenant/TenantManagerController.cs
index e093bdf2..a84a8b8d 100644
--- a/Tiobon.Core.Api/Controllers/Tenant/TenantManagerController.cs
+++ b/Tiobon.Core.Api/Controllers/Tenant/TenantManagerController.cs
@@ -1,18 +1,11 @@
-using Tiobon.Core.Controllers;
-using Tiobon.Core.IServices;
-using Tiobon.Core.Model;
-using Tiobon.Core.Model.Models;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-
-namespace Tiobon.Core.Api.Controllers.Tenant;
+namespace Tiobon.Core.Api.Controllers.Tenant;
///
/// 租户管理
///
[Produces("application/json")]
[Route("api/TenantManager")]
-[Authorize]
+[Authorize, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class TenantManagerController : BaseApiController
{
private readonly ITenantService _services;
diff --git a/Tiobon.Core.Api/Controllers/TopicController.cs b/Tiobon.Core.Api/Controllers/TopicController.cs
index fb2beb23..0fd0a9c7 100644
--- a/Tiobon.Core.Api/Controllers/TopicController.cs
+++ b/Tiobon.Core.Api/Controllers/TopicController.cs
@@ -4,7 +4,7 @@
/// 类别管理【无权限】
///
[Route("api/[controller]")]
- [ApiController]
+ [ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
[AllowAnonymous]
public class TopicController : ControllerBase
{
diff --git a/Tiobon.Core.Api/Controllers/TopicDetailController.cs b/Tiobon.Core.Api/Controllers/TopicDetailController.cs
index 1f2f36d8..4fa5ed72 100644
--- a/Tiobon.Core.Api/Controllers/TopicDetailController.cs
+++ b/Tiobon.Core.Api/Controllers/TopicDetailController.cs
@@ -5,7 +5,7 @@
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class TopicDetailController : ControllerBase
{
readonly ITopicServices _topicServices;
diff --git a/Tiobon.Core.Api/Controllers/TransactionController.cs b/Tiobon.Core.Api/Controllers/TransactionController.cs
index acb5a8b5..0280e297 100644
--- a/Tiobon.Core.Api/Controllers/TransactionController.cs
+++ b/Tiobon.Core.Api/Controllers/TransactionController.cs
@@ -1,7 +1,7 @@
namespace Tiobon.Core.Controllers
{
[Route("api/[controller]/[action]")]
- [ApiController]
+ [ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
[AllowAnonymous]
public class TransactionController : ControllerBase
{
diff --git a/Tiobon.Core.Api/Controllers/UserController.cs b/Tiobon.Core.Api/Controllers/UserController.cs
index f2b51ec9..8843e282 100644
--- a/Tiobon.Core.Api/Controllers/UserController.cs
+++ b/Tiobon.Core.Api/Controllers/UserController.cs
@@ -7,7 +7,7 @@ namespace Tiobon.Core.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class UserController : BaseApiController
{
private readonly IUnitOfWorkManage _unitOfWorkManage;
diff --git a/Tiobon.Core.Api/Controllers/UserRoleController.cs b/Tiobon.Core.Api/Controllers/UserRoleController.cs
index 21e32d03..b48958e7 100644
--- a/Tiobon.Core.Api/Controllers/UserRoleController.cs
+++ b/Tiobon.Core.Api/Controllers/UserRoleController.cs
@@ -6,7 +6,7 @@
[Produces("application/json")]
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_System)]
public class UserRoleController : Controller
{
private readonly ISysUserInfoServices _sysUserInfoServices;
diff --git a/Tiobon.Core.Api/Controllers/ValuesController.cs b/Tiobon.Core.Api/Controllers/ValuesController.cs
index 5d622ec2..030d2c56 100644
--- a/Tiobon.Core.Api/Controllers/ValuesController.cs
+++ b/Tiobon.Core.Api/Controllers/ValuesController.cs
@@ -13,7 +13,7 @@ namespace Tiobon.Core.Controllers
/// Values控制器
///
[Route("api/[controller]/[action]")]
- [ApiController]
+ [ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
//[Authorize]
//[Authorize(Roles = "Admin,Client")]
//[Authorize(Policy = "SystemOrAdmin")]
diff --git a/Tiobon.Core.Api/Controllers/WeChatCompanyController.cs b/Tiobon.Core.Api/Controllers/WeChatCompanyController.cs
index 02d867c2..e3b79c6b 100644
--- a/Tiobon.Core.Api/Controllers/WeChatCompanyController.cs
+++ b/Tiobon.Core.Api/Controllers/WeChatCompanyController.cs
@@ -5,7 +5,7 @@ namespace Tiobon.Core.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_WeChat)]
public partial class WeChatCompanyController : Controller
{
readonly IWeChatCompanyServices _WeChatCompanyServices;
diff --git a/Tiobon.Core.Api/Controllers/WeChatConfigController.cs b/Tiobon.Core.Api/Controllers/WeChatConfigController.cs
index 0caaae90..e7004719 100644
--- a/Tiobon.Core.Api/Controllers/WeChatConfigController.cs
+++ b/Tiobon.Core.Api/Controllers/WeChatConfigController.cs
@@ -5,7 +5,7 @@ namespace Tiobon.Core.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_WeChat)]
public partial class WeChatConfigController : Controller
{
readonly IWeChatConfigServices _WeChatConfigServices;
diff --git a/Tiobon.Core.Api/Controllers/WeChatController.cs b/Tiobon.Core.Api/Controllers/WeChatController.cs
index cfbd6b79..1e9cedc7 100644
--- a/Tiobon.Core.Api/Controllers/WeChatController.cs
+++ b/Tiobon.Core.Api/Controllers/WeChatController.cs
@@ -5,7 +5,7 @@
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_WeChat)]
public partial class WeChatController : Controller
{
readonly IWeChatConfigServices _weChatConfigServices;
diff --git a/Tiobon.Core.Api/Controllers/WeChatPushLogController.cs b/Tiobon.Core.Api/Controllers/WeChatPushLogController.cs
index 7c72403a..644dbc55 100644
--- a/Tiobon.Core.Api/Controllers/WeChatPushLogController.cs
+++ b/Tiobon.Core.Api/Controllers/WeChatPushLogController.cs
@@ -5,7 +5,7 @@ namespace Tiobon.Core.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_WeChat)]
public partial class WeChatPushLogController : Controller
{
readonly IWeChatPushLogServices _WeChatPushLogServices;
diff --git a/Tiobon.Core.Api/Controllers/WeChatSubController.cs b/Tiobon.Core.Api/Controllers/WeChatSubController.cs
index cb0163d3..6e034f6d 100644
--- a/Tiobon.Core.Api/Controllers/WeChatSubController.cs
+++ b/Tiobon.Core.Api/Controllers/WeChatSubController.cs
@@ -5,7 +5,7 @@ namespace Tiobon.Core.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_WeChat)]
public partial class WeChatSubController : Controller
{
readonly IWeChatSubServices _WeChatSubServices;
diff --git a/Tiobon.Core.Api/Controllers/v1/ApbController.cs b/Tiobon.Core.Api/Controllers/v1/ApbController.cs
index bd02e4a9..62e8b852 100644
--- a/Tiobon.Core.Api/Controllers/v1/ApbController.cs
+++ b/Tiobon.Core.Api/Controllers/v1/ApbController.cs
@@ -1,12 +1,9 @@
-using System.Collections.Generic;
-using Tiobon.Core.SwaggerHelper;
-using Microsoft.AspNetCore.Mvc;
-using static Tiobon.Core.Extensions.CustomApiVersion;
+using static Tiobon.Core.Extensions.CustomApiVersion;
namespace Tiobon.Core.Controllers.v1
{
[Route("api/[controller]")]
- [ApiController]
+ [ApiController, ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class ApbController : ControllerBase
{
diff --git a/Tiobon.Core.Api/Controllers/v2/ApbController.cs b/Tiobon.Core.Api/Controllers/v2/ApbController.cs
index 7f961835..498879e2 100644
--- a/Tiobon.Core.Api/Controllers/v2/ApbController.cs
+++ b/Tiobon.Core.Api/Controllers/v2/ApbController.cs
@@ -1,15 +1,8 @@
-using Tiobon.Core.SwaggerHelper;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using System.Collections.Generic;
-using static Tiobon.Core.Extensions.CustomApiVersion;
-
-namespace Tiobon.Core.Controllers.v2
+namespace Tiobon.Core.Controllers.v2
{
- [CustomRoute(ApiVersions.V2)]
//[Route("api/[controller]")]
[ApiController]
- [Authorize(Permissions.Name)]
+ [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class ApbController : ControllerBase
{
diff --git a/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs b/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs
index a144426b..92727d31 100644
--- a/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs
+++ b/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs
@@ -187,6 +187,17 @@ namespace Tiobon.Core.Extensions
}
},
new SwaggerApiInfo
+ {
+ UrlPrefix = Grouping.GroupName_Assistant,
+ Name = "工具模块",
+ OpenApiInfo = new OpenApiInfo
+ {
+ Version = version,
+ Title = "工具模块",
+ Description = "自助测量程序/中央站...",
+ }
+ },
+ new SwaggerApiInfo
{
UrlPrefix = Grouping.GroupName_Other,
Name = "其他模块",
@@ -196,6 +207,16 @@ namespace Tiobon.Core.Extensions
Title = "其他模块",
Description = "其他...",
}
+ }, new SwaggerApiInfo
+ {
+ UrlPrefix = Grouping.GroupName_WeChat,
+ Name = "微信模块",
+ OpenApiInfo = new OpenApiInfo
+ {
+ Version = version,
+ Title = "微信模块",
+ Description = "小程序..."
+ }
},
new SwaggerApiInfo
{
@@ -249,6 +270,14 @@ namespace Tiobon.Core.Extensions
/// Ghra
///
public const string GroupName_Ghra = "Ghra";
+ ///
+ /// 辅助工具
+ ///
+ public const string GroupName_Assistant = "assistant";
+ ///
+ /// 微信
+ ///
+ public const string GroupName_WeChat = " wechat";
}
}