diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/AnalyseController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/AnalyseController.cs
index 3344d501..07cf9a0b 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/AnalyseController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/AnalyseController.cs
@@ -8,7 +8,7 @@ using System.Linq;
namespace Bootstrap.Admin.Controllers.Api
{
///
- ///
+ /// 网站分析控制器
///
[Route("api/[controller]")]
[Authorize]
@@ -16,11 +16,11 @@ namespace Bootstrap.Admin.Controllers.Api
public class AnalyseController : ControllerBase
{
///
- ///
+ /// 通过 logType 查询分析数据接口
///
///
[HttpGet()]
- public ActionResult Get([FromQuery]string logType = "")
+ public ActionResult Get([FromQuery]string logType)
{
var ret = new AnalyseData();
if (logType.Equals("LoginUsers", StringComparison.OrdinalIgnoreCase))
@@ -60,19 +60,19 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
+ /// 分析数据实体类
///
public class AnalyseData
{
///
- ///
+ /// 获得/设置 折线数据集合
///
- public IEnumerable Polylines { get; set; } = new List();
+ public IEnumerable Polylines { get; set; } = new string[0];
///
- ///
+ /// 获得 数据集合
///
- public List> Datas { get; set; } = new List>();
+ public List> Datas { get; } = new List>();
}
}
}
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/AppsController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/AppsController.cs
index 2047677a..bf338c6c 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/AppsController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/AppsController.cs
@@ -1,4 +1,4 @@
-using Bootstrap.DataAccess;
+using Bootstrap.DataAccess;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace Bootstrap.Admin.Controllers.Api
{
///
- ///
+ /// 应用程序控制器
///
[Route("api/[controller]")]
[Authorize]
@@ -14,7 +14,7 @@ namespace Bootstrap.Admin.Controllers.Api
public class AppsController : ControllerBase
{
///
- ///
+ /// 通过角色ID获取其授权的所有应用程序集合
///
///
///
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/CategoryController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/CategoryController.cs
index c6187c15..53944ae3 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/CategoryController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/CategoryController.cs
@@ -15,7 +15,7 @@ namespace Bootstrap.Admin.Controllers.Api
public class CategoryController : ControllerBase
{
///
- /// 获取字典表中所有Category数据
+ /// 获取字典表中所有 Category 数据
///
///
[HttpGet]
@@ -26,7 +26,7 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
+ /// 获取所有菜单数据
///
///
[HttpGet]
@@ -36,7 +36,7 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
+ /// 获取所有父级菜单数据
///
///
[HttpGet]
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/DictsController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/DictsController.cs
index 61e9df13..3dfc82b8 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/DictsController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/DictsController.cs
@@ -10,7 +10,7 @@ using System.Collections.Generic;
namespace Bootstrap.Admin.Controllers.Api
{
///
- ///
+ /// 字典表维护控制器
///
[Route("api/[controller]")]
[Authorize]
@@ -18,7 +18,7 @@ namespace Bootstrap.Admin.Controllers.Api
public class DictsController : ControllerBase
{
///
- ///
+ /// 获取所有字典表数据方法
///
///
///
@@ -28,7 +28,7 @@ namespace Bootstrap.Admin.Controllers.Api
return value.RetrieveData();
}
///
- ///
+ /// 保存字典方法
///
///
[HttpPost]
@@ -38,7 +38,7 @@ namespace Bootstrap.Admin.Controllers.Api
return DictHelper.Save(value);
}
///
- ///
+ /// 删除字典项方法
///
///
[HttpDelete]
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs
index 01e1b590..d7e4d48a 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs
@@ -80,12 +80,12 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
+ /// 查询服务器端日志文件参数类
///
public class ExceptionFileQuery
{
///
- ///
+ /// 获取/设置 文件名称
///
public string FileName { get; set; } = "";
}
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/GroupsController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/GroupsController.cs
index c7493b99..3d910144 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/GroupsController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/GroupsController.cs
@@ -10,7 +10,7 @@ using System.Linq;
namespace Bootstrap.Admin.Controllers.Api
{
///
- ///
+ /// 部门维护控制器
///
[Route("api/[controller]")]
[Authorize]
@@ -18,7 +18,7 @@ namespace Bootstrap.Admin.Controllers.Api
public class GroupsController : ControllerBase
{
///
- ///
+ /// 部门数据查询方法
///
///
///
@@ -29,18 +29,7 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
- ///
- ///
- ///
- [HttpGet("{id}")]
- public Group Get(string id)
- {
- return GroupHelper.Retrieves().FirstOrDefault(t => t.Id == id);
- }
-
- ///
- ///
+ /// 保存部门方法
///
///
[HttpPost]
@@ -51,7 +40,7 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
+ /// 删除部门方法
///
///
[HttpDelete]
@@ -64,7 +53,7 @@ namespace Bootstrap.Admin.Controllers.Api
///
/// 获取部门授权
///
- ///
+ /// 用户ID或者角色ID
///
///
[HttpPost("{id}")]
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/NewController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/NewController.cs
index 789bd9bb..02496093 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/NewController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/NewController.cs
@@ -7,7 +7,7 @@ using System.Linq;
namespace Bootstrap.Admin.Controllers
{
///
- ///
+ /// 新用户注册控制器
///
[Route("api/[controller]")]
[Authorize]
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/ProfilesController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/ProfilesController.cs
index c843a1f0..4b6d06bf 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/ProfilesController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/ProfilesController.cs
@@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace Bootstrap.Admin.Controllers.Api
{
///
- ///
+ /// 个人中心控制器
///
[Route("api/[controller]")]
[Authorize]
@@ -30,9 +30,6 @@ namespace Bootstrap.Admin.Controllers.Api
public JsonResult Post(string id, [FromServices]IWebHostEnvironment env, [FromForm]DeleteFileCollection files)
{
if (!id.Equals("Delete", StringComparison.OrdinalIgnoreCase)) return new JsonResult(new object());
-
- var previewUrl = string.Empty;
- long fileSize = 0;
var userName = User.Identity.Name;
var fileName = files.Key;
@@ -41,9 +38,9 @@ namespace Bootstrap.Admin.Controllers.Api
fileName = "default.jpg";
var webSiteUrl = DictHelper.RetrieveIconFolderPath();
var filePath = Path.Combine(env.WebRootPath, webSiteUrl.Replace("~", string.Empty).Replace('/', Path.DirectorySeparatorChar).TrimStart(Path.DirectorySeparatorChar) + fileName);
- fileSize = new FileInfo(filePath).Length;
+ var fileSize = new FileInfo(filePath).Length;
var iconName = $"{fileName}?v={DateTime.Now.Ticks}";
- previewUrl = Url.Content($"{webSiteUrl}{iconName}");
+ var previewUrl = Url.Content($"{webSiteUrl}{iconName}");
if (!string.IsNullOrEmpty(userName)) UserHelper.SaveUserIconByName(userName, iconName);
return new JsonResult(new
@@ -57,12 +54,12 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
+ /// 待删除文件集合类
///
public class DeleteFileCollection
{
///
- ///
+ /// 获得/设置 文件名称
///
public string Key { get; set; } = "";
}
@@ -109,7 +106,7 @@ namespace Bootstrap.Admin.Controllers.Api
}
///
- ///
+ /// 个人中心操作方法 更改样式 更改显示名称 更改默认应用
///
///
[HttpPut]
diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/RolesController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/RolesController.cs
index 6b0040d1..cfbb3bd5 100644
--- a/src/admin/Bootstrap.Admin/Controllers/Api/RolesController.cs
+++ b/src/admin/Bootstrap.Admin/Controllers/Api/RolesController.cs
@@ -11,7 +11,7 @@ using System.Linq;
namespace Bootstrap.Admin.Controllers.Api
{
///
- ///
+ /// 角色维护控制器
///
[Route("api/[controller]")]
[Authorize]
@@ -19,7 +19,7 @@ namespace Bootstrap.Admin.Controllers.Api
public class RolesController : ControllerBase
{
///
- ///
+ /// 获取所有角色数据
///
///
///
@@ -37,7 +37,7 @@ namespace Bootstrap.Admin.Controllers.Api
[HttpPost("{id}")]
public IEnumerable