优化代码注释&命名空间

This commit is contained in:
不做码农
2023-05-04 18:20:18 +08:00
parent 547945d85b
commit a89762e070
47 changed files with 224 additions and 353 deletions

View File

@@ -5,7 +5,7 @@ using MiniExcelLibs;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Web;
using ff = System.IO;
using Io = System.IO;
namespace ZR.Admin.WebApi.Controllers
{
@@ -61,7 +61,7 @@ namespace ZR.Admin.WebApi.Controllers
//IWebHostEnvironment webHostEnvironment = (IWebHostEnvironment)App.ServiceProvider.GetService(typeof(IWebHostEnvironment));
//string fileDir = Path.Combine(webHostEnvironment.WebRootPath, path, fileName);
var stream = ff.File.OpenRead(path); //创建文件流
var stream = Io.File.OpenRead(path); //创建文件流
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", HttpUtility.UrlEncode(fileName));
}

View File

@@ -10,7 +10,7 @@ namespace ZR.Admin.WebApi.Controllers.monitor
[HttpGet("list")]
public IActionResult Index()
{
return SUCCESS(null);
return SUCCESS(1);
}
}
}

View File

@@ -16,7 +16,7 @@ namespace ZR.Admin.WebApi.Filters
/// <summary>
/// 权限字符串,例如 system:user:view
/// </summary>
public string Permission { get; set; }
public string Permission { get; set; } = string.Empty;
private bool HasPermi { get; set; }
private bool HasRole { get; set; }
public ActionPermissionFilter() { }

View File

@@ -111,7 +111,7 @@ namespace ZR.Admin.WebApi.Filters
if (logAttribute != null)
{
sysOperLog.Title = logAttribute?.Title;
sysOperLog.BusinessType = (int)logAttribute?.BusinessType;
sysOperLog.BusinessType = (int)logAttribute.BusinessType;
sysOperLog.OperParam = logAttribute.IsSaveRequestData ? sysOperLog.OperParam : "";
sysOperLog.JsonResult = logAttribute.IsSaveResponseData ? sysOperLog.JsonResult : "";
}

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Admin.WebApi.Hubs
namespace ZR.Admin.WebApi.Hubs
{
public class OnlineUsers
{
@@ -17,8 +13,8 @@ namespace ZR.Admin.WebApi.Hubs
public string Name { get; set; }
public DateTime LoginTime { get; set; }
public string UserIP { get; set; }
public string Location { get; set; }
public string Uuid{ get; set; }
public string? Location { get; set; }
public string? Uuid{ get; set; }
public OnlineUsers(string clientid, string name, long? userid, string userip)
{