浏览代码

😎代码优化

zuohuaijun 1 年之前
父节点
当前提交
c6d0160053

+ 2 - 2
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -34,11 +34,11 @@
     <PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.2" />
     <PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.8" />
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.4.0" />
-    <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.6.0" />
+    <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.7.0" />
     <PackageReference Include="SqlSugarCore" Version="5.1.4.166" />
     <PackageReference Include="SSH.NET" Version="2024.1.0" />
     <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.4" />
-    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1065" />
+    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1066" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
   </ItemGroup>

+ 4 - 5
Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs

@@ -19,11 +19,10 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData<SysRoleMenu>
     {
         return new[]
         {
-            // 数据面板【admin/1300000000101】
+            ////// 数据面板【admin/1300000000101】
             new SysRoleMenu{ Id=1300000000101, RoleId=1300000000101, MenuId=1300000000101 },
             new SysRoleMenu{ Id=1300000000102, RoleId=1300000000101, MenuId=1300000000111 },
             new SysRoleMenu{ Id=1300000000103, RoleId=1300000000101, MenuId=1300000000121 },
-
             // 系统管理
             new SysRoleMenu{ Id=1300000000111, RoleId=1300000000101, MenuId=1310000000101 },
             // 账号管理
@@ -78,9 +77,8 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData<SysRoleMenu>
             new SysRoleMenu{ Id=1300000000193, RoleId=1300000000101, MenuId=1310000000183 },
             new SysRoleMenu{ Id=1300000000194, RoleId=1300000000101, MenuId=1310000000184 },
             new SysRoleMenu{ Id=1300000000195, RoleId=1300000000101, MenuId=1310000000185 },
-
-            //// 平台管理
-            //new SysRoleMenu{ Id=1300000000201, RoleId=1300000000101, MenuId=1310000000301 },
+            // 平台管理
+            new SysRoleMenu{ Id=1300000000201, RoleId=1300000000101, MenuId=1310000000301 },
             // 任务调度
             new SysRoleMenu{ Id=1300000000251, RoleId=1300000000101, MenuId=1310000000351 },
             new SysRoleMenu{ Id=1300000000252, RoleId=1300000000101, MenuId=1310000000352 },
@@ -93,6 +91,7 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData<SysRoleMenu>
             new SysRoleMenu{ Id=1300000000271, RoleId=1300000000101, MenuId=1310000000371 },
             new SysRoleMenu{ Id=1300000000272, RoleId=1300000000101, MenuId=1310000000372 },
             new SysRoleMenu{ Id=1300000000273, RoleId=1300000000101, MenuId=1310000000373 },
+            new SysRoleMenu{ Id=1300000000274, RoleId=1300000000101, MenuId=1310000000374 },
             // 行政区域
             new SysRoleMenu{ Id=1300000000281, RoleId=1300000000101, MenuId=1310000000381 },
             new SysRoleMenu{ Id=1300000000282, RoleId=1300000000101, MenuId=1310000000382 },

+ 3 - 6
Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs

@@ -90,16 +90,13 @@ public class SysCacheService : IDynamicApiController, ISingleton
     /// 清空所有缓存 🔖
     /// </summary>
     /// <returns></returns>
-    [HttpDelete]
     [DisplayName("清空所有缓存")]
-    [ApiDescriptionSettings(Name = "Clear")]
+    [ApiDescriptionSettings(Name = "Clear"), HttpPost]
     public void Clear()
     {
-        // 清除框架的缓存
         _cacheProvider.Cache.Clear();
-        // 当使用Redis时,清除MemoryCache,SqlSugarFilter会用到
-        var memoryCache = Cache.Default;
-        if (memoryCache != _cacheProvider.Cache) memoryCache.Clear();
+
+        Cache.Default.Clear();
     }
 
     /// <summary>

+ 12 - 24
Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs

@@ -113,59 +113,56 @@ public class SysFileService : IDynamicApiController, ITransient
     {
         var file = input.Id > 0 ? await GetFile(input) : await _sysFileRep.CopyNew().GetFirstAsync(u => u.Url == input.Url);
         var fileName = HttpUtility.UrlEncode(file.FileName, Encoding.GetEncoding("UTF-8"));
+        var filePath = Path.Combine(file.FilePath, file.Id.ToString() + file.Suffix);
 
         if (_OSSProviderOptions.IsEnable)
         {
-            var filePath = string.Concat(file.FilePath, "/", file.Id.ToString() + file.Suffix);
             var stream = await (await _OSSService.PresignedGetObjectAsync(file.BucketName.ToString(), filePath, 5)).GetAsStreamAsync();
             return new FileStreamResult(stream.Stream, "application/octet-stream") { FileDownloadName = fileName + file.Suffix };
         }
         else if (App.Configuration["SSHProvider:IsEnable"].ToBoolean())
         {
-            var fullPath = string.Concat(file.FilePath, "/", file.Id + file.Suffix);
             using (SSHHelper helper = new SSHHelper(App.Configuration["SSHProvider:Host"],
                App.Configuration["SSHProvider:Port"].ToInt(), App.Configuration["SSHProvider:Username"], App.Configuration["SSHProvider:Password"]))
             {
-                return new FileStreamResult(helper.OpenRead(fullPath), "application/octet-stream") { FileDownloadName = fileName + file.Suffix };
+                return new FileStreamResult(helper.OpenRead(filePath), "application/octet-stream") { FileDownloadName = fileName + file.Suffix };
             }
         }
         else
         {
-            var filePath = Path.Combine(file.FilePath, file.Id.ToString() + file.Suffix);
             var path = Path.Combine(App.WebHostEnvironment.WebRootPath, filePath);
             return new FileStreamResult(new FileStream(path, FileMode.Open), "application/octet-stream") { FileDownloadName = fileName + file.Suffix };
         }
     }
 
     /// <summary>
-    /// 文件预览
+    /// 文件预览 🔖
     /// </summary>
     /// <param name="Id"></param>
     /// <returns></returns>
+    [DisplayName("文件预览")]
     [AllowAnonymous]
     public async Task<IActionResult> GetPreview([FromRoute] long Id)
     {
         var file = await GetFile(new FileInput { Id = Id });
         //var fileName = HttpUtility.UrlEncode(file.FileName, Encoding.GetEncoding("UTF-8"));
+        var filePath = Path.Combine(file.FilePath, file.Id.ToString() + file.Suffix);
 
         if (_OSSProviderOptions.IsEnable)
         {
-            var filePath = string.Concat(file.FilePath, "/", file.Id.ToString() + file.Suffix);
             var stream = await (await _OSSService.PresignedGetObjectAsync(file.BucketName.ToString(), filePath, 5)).GetAsStreamAsync();
             return new FileStreamResult(stream.Stream, "application/octet-stream");
         }
         else if (App.Configuration["SSHProvider:IsEnable"].ToBoolean())
         {
-            var fullPath = string.Concat(file.FilePath, "/", file.Id + file.Suffix);
             using (SSHHelper helper = new SSHHelper(App.Configuration["SSHProvider:Host"],
                App.Configuration["SSHProvider:Port"].ToInt(), App.Configuration["SSHProvider:Username"], App.Configuration["SSHProvider:Password"]))
             {
-                return new FileStreamResult(helper.OpenRead(fullPath), "application/octet-stream");
+                return new FileStreamResult(helper.OpenRead(filePath), "application/octet-stream");
             }
         }
         else
         {
-            var filePath = Path.Combine(file.FilePath, file.Id.ToString() + file.Suffix);
             var path = Path.Combine(App.WebHostEnvironment.WebRootPath, filePath);
             return new FileStreamResult(new FileStream(path, FileMode.Open), "application/octet-stream");
         }
@@ -274,11 +271,12 @@ public class SysFileService : IDynamicApiController, ITransient
     }
 
     /// <summary>
-    /// 获取文件
+    /// 获取文件 🔖
     /// </summary>
     /// <param name="input"></param>
     /// <returns></returns>
-    private async Task<SysFile> GetFile([FromQuery] FileInput input)
+    [DisplayName("获取文件")]
+    public async Task<SysFile> GetFile([FromQuery] FileInput input)
     {
         var file = await _sysFileRep.CopyNew().GetFirstAsync(u => u.Id == input.Id);
         return file ?? throw Oops.Oh(ErrorCodeEnum.D8000);
@@ -387,7 +385,7 @@ public class SysFileService : IDynamicApiController, ITransient
         }
         else if (App.Configuration["SSHProvider:IsEnable"].ToBoolean())
         {
-            var fullPath = string.Concat(path.StartsWith("/") ? path : "/" + path, "/", finalName);
+            var fullPath = string.Concat(path.StartsWith('/') ? path : "/" + path, "/", finalName);
             using (SSHHelper helper = new SSHHelper(App.Configuration["SSHProvider:Host"],
                App.Configuration["SSHProvider:Port"].ToInt(), App.Configuration["SSHProvider:Username"], App.Configuration["SSHProvider:Password"]))
             {
@@ -417,17 +415,6 @@ public class SysFileService : IDynamicApiController, ITransient
         return newFile;
     }
 
-    ///// <summary>
-    ///// 获取Minio文件的下载或者预览地址
-    ///// </summary>
-    ///// <param name="bucketName">桶名</param>
-    ///// <param name="fileName">文件名</param>
-    ///// <returns></returns>
-    //private async Task<string> GetMinioPreviewFileUrl(string bucketName, string fileName)
-    //{
-    //    return await _OSSService.PresignedGetObjectAsync(bucketName, fileName, 7);
-    //}
-
     /// <summary>
     /// 上传头像 🔖
     /// </summary>
@@ -473,7 +460,7 @@ public class SysFileService : IDynamicApiController, ITransient
     }
 
     /// <summary>
-    /// 修改附件关联对象
+    /// 修改附件关联对象 🔖
     /// </summary>
     /// <param name="ids"></param>
     /// <param name="relationName"></param>
@@ -499,6 +486,7 @@ public class SysFileService : IDynamicApiController, ITransient
     /// <param name="input"></param>
     /// <returns></returns>
     /// <exception cref="ArgumentNullException"></exception>
+    [DisplayName("根据关联查询附件")]
     public async Task<List<FileOutput>> GetRelationFiles([FromQuery] RelationQueryInput input)
     {
         return await _sysFileRep.AsQueryable()

+ 0 - 0
Admin.NET/Admin.NET.Core/Service/Logging/Dto/ExportLogDto.cs → Admin.NET/Admin.NET.Core/Service/Log/Dto/ExportLogDto.cs


+ 0 - 0
Admin.NET/Admin.NET.Core/Service/Logging/Dto/LogInput.cs → Admin.NET/Admin.NET.Core/Service/Log/Dto/LogInput.cs


+ 0 - 0
Admin.NET/Admin.NET.Core/Service/Logging/Dto/LogVisOutput.cs → Admin.NET/Admin.NET.Core/Service/Log/Dto/LogVisOutput.cs


+ 0 - 0
Admin.NET/Admin.NET.Core/Service/Logging/SysLogDiffService.cs → Admin.NET/Admin.NET.Core/Service/Log/SysLogDiffService.cs


+ 0 - 0
Admin.NET/Admin.NET.Core/Service/Logging/SysLogExService.cs → Admin.NET/Admin.NET.Core/Service/Log/SysLogExService.cs


+ 0 - 0
Admin.NET/Admin.NET.Core/Service/Logging/SysLogOpService.cs → Admin.NET/Admin.NET.Core/Service/Log/SysLogOpService.cs


+ 0 - 0
Admin.NET/Admin.NET.Core/Service/Logging/SysLogVisService.cs → Admin.NET/Admin.NET.Core/Service/Log/SysLogVisService.cs


+ 2 - 2
Web/package.json

@@ -2,7 +2,7 @@
 	"name": "admin.net",
 	"type": "module",
 	"version": "2.4.33",
-	"lastBuildTime": "2024.08.10",
+	"lastBuildTime": "2024.08.13",
 	"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
 	"author": "zuohuaijun",
 	"license": "MIT",
@@ -44,7 +44,7 @@
 		"js-table2excel": "^1.1.2",
 		"jsplumb": "^2.15.6",
 		"lodash-es": "^4.17.21",
-		"md-editor-v3": "^4.18.0",
+		"md-editor-v3": "^4.18.1",
 		"mitt": "^3.0.1",
 		"monaco-editor": "^0.50.0",
 		"mqtt": "^4.3.8",

+ 75 - 0
Web/src/api-services/apis/sys-cache-api.ts

@@ -26,6 +26,49 @@ import { AdminResultObject } from '../models';
  */
 export const SysCacheApiAxiosParamCreator = function (configuration?: Configuration) {
     return {
+        /**
+         * 
+         * @summary 清空所有缓存 🔖
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        apiSysCacheClearPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/api/sysCache/clear`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+            // http bearer authentication required
+            if (configuration && configuration.accessToken) {
+                const accessToken = typeof configuration.accessToken === 'function'
+                    ? await configuration.accessToken()
+                    : await configuration.accessToken;
+                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
+            }
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
         /**
          * 
          * @summary 根据键名前缀删除缓存 🔖
@@ -274,6 +317,19 @@ export const SysCacheApiAxiosParamCreator = function (configuration?: Configurat
  */
 export const SysCacheApiFp = function(configuration?: Configuration) {
     return {
+        /**
+         * 
+         * @summary 清空所有缓存 🔖
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysCacheClearPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
+            const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheClearPost(options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
         /**
          * 
          * @summary 根据键名前缀删除缓存 🔖
@@ -352,6 +408,15 @@ export const SysCacheApiFp = function(configuration?: Configuration) {
  */
 export const SysCacheApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
     return {
+        /**
+         * 
+         * @summary 清空所有缓存 🔖
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysCacheClearPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
+            return SysCacheApiFp(configuration).apiSysCacheClearPost(options).then((request) => request(axios, basePath));
+        },
         /**
          * 
          * @summary 根据键名前缀删除缓存 🔖
@@ -411,6 +476,16 @@ export const SysCacheApiFactory = function (configuration?: Configuration, baseP
  * @extends {BaseAPI}
  */
 export class SysCacheApi extends BaseAPI {
+    /**
+     * 
+     * @summary 清空所有缓存 🔖
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysCacheApi
+     */
+    public async apiSysCacheClearPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
+        return SysCacheApiFp(this.configuration).apiSysCacheClearPost(options).then((request) => request(this.axios, this.basePath));
+    }
     /**
      * 
      * @summary 根据键名前缀删除缓存 🔖

+ 115 - 4
Web/src/api-services/apis/sys-file-api.ts

@@ -177,6 +177,73 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
                 options: localVarRequestOptions,
             };
         },
+        /**
+         * 
+         * @summary 获取文件 🔖
+         * @param {number} id 主键Id
+         * @param {string} [fileName] 文件名称
+         * @param {string} [fileType] 文件类型
+         * @param {string} [url] 文件Url
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        apiSysFileFileGet: async (id: number, fileName?: string, fileType?: string, url?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            // verify required parameter 'id' is not null or undefined
+            if (id === null || id === undefined) {
+                throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysFileFileGet.');
+            }
+            const localVarPath = `/api/sysFile/file`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+            // http bearer authentication required
+            if (configuration && configuration.accessToken) {
+                const accessToken = typeof configuration.accessToken === 'function'
+                    ? await configuration.accessToken()
+                    : await configuration.accessToken;
+                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
+            }
+
+            if (fileName !== undefined) {
+                localVarQueryParameter['FileName'] = fileName;
+            }
+
+            if (fileType !== undefined) {
+                localVarQueryParameter['FileType'] = fileType;
+            }
+
+            if (url !== undefined) {
+                localVarQueryParameter['Url'] = url;
+            }
+
+            if (id !== undefined) {
+                localVarQueryParameter['Id'] = id;
+            }
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
         /**
          * 
          * @summary 获取文件分页列表 🔖
@@ -227,7 +294,7 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
         },
         /**
          * 
-         * @summary 文件预览
+         * @summary 文件预览 🔖
          * @param {number} id 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
@@ -703,6 +770,23 @@ export const SysFileApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
+        /**
+         * 
+         * @summary 获取文件 🔖
+         * @param {number} id 主键Id
+         * @param {string} [fileName] 文件名称
+         * @param {string} [fileType] 文件类型
+         * @param {string} [url] 文件Url
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, url?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysFile>>> {
+            const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileFileGet(id, fileName, fileType, url, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
         /**
          * 
          * @summary 获取文件分页列表 🔖
@@ -719,7 +803,7 @@ export const SysFileApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 文件预览
+         * @summary 文件预览 🔖
          * @param {number} id 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
@@ -873,6 +957,19 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
         async apiSysFileDownloadFilePost(body?: FileInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultIActionResult>> {
             return SysFileApiFp(configuration).apiSysFileDownloadFilePost(body, options).then((request) => request(axios, basePath));
         },
+        /**
+         * 
+         * @summary 获取文件 🔖
+         * @param {number} id 主键Id
+         * @param {string} [fileName] 文件名称
+         * @param {string} [fileType] 文件类型
+         * @param {string} [url] 文件Url
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, url?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysFile>> {
+            return SysFileApiFp(configuration).apiSysFileFileGet(id, fileName, fileType, url, options).then((request) => request(axios, basePath));
+        },
         /**
          * 
          * @summary 获取文件分页列表 🔖
@@ -885,7 +982,7 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
         },
         /**
          * 
-         * @summary 文件预览
+         * @summary 文件预览 🔖
          * @param {number} id 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
@@ -1011,6 +1108,20 @@ export class SysFileApi extends BaseAPI {
     public async apiSysFileDownloadFilePost(body?: FileInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultIActionResult>> {
         return SysFileApiFp(this.configuration).apiSysFileDownloadFilePost(body, options).then((request) => request(this.axios, this.basePath));
     }
+    /**
+     * 
+     * @summary 获取文件 🔖
+     * @param {number} id 主键Id
+     * @param {string} [fileName] 文件名称
+     * @param {string} [fileType] 文件类型
+     * @param {string} [url] 文件Url
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysFileApi
+     */
+    public async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, url?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysFile>> {
+        return SysFileApiFp(this.configuration).apiSysFileFileGet(id, fileName, fileType, url, options).then((request) => request(this.axios, this.basePath));
+    }
     /**
      * 
      * @summary 获取文件分页列表 🔖
@@ -1024,7 +1135,7 @@ export class SysFileApi extends BaseAPI {
     }
     /**
      * 
-     * @summary 文件预览
+     * @summary 文件预览 🔖
      * @param {number} id 
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}

+ 7 - 6
Web/src/views/system/cache/index.vue

@@ -10,12 +10,16 @@
 					<template #header>
 						<div class="card-header">
 							<span>缓存列表</span>
-							<el-button icon="ele-Refresh" size="small" circle @click="handleQuery" v-auth="'sysCache:keyList'" />
+							<div>
+								<el-button icon="ele-Refresh" size="small" type="success" circle plain @click="handleQuery" v-auth="'sysCache:keyList'" />
+								<el-button icon="ele-DeleteFilled" size="small" type="danger" circle plain @click="clearCache" v-auth="'sysCache:clear'"> </el-button>
+							</div>
 						</div>
 					</template>
 					<el-tree
 						ref="treeRef"
 						class="filter-tree"
+						style="padding-bottom: 60px"
 						:data="state.cacheData"
 						node-key="id"
 						:props="{ children: 'children', label: 'name' }"
@@ -33,13 +37,10 @@
 					<template #header>
 						<div class="card-header">
 							<span>{{ `缓存数据${state.cacheKey ? `【${state.cacheKey}】` : ''}` }}</span>
-							<el-space :size="5">
-								<el-button icon="ele-Delete" size="small" type="danger" @click="delCache" v-auth="'sysCache:delete'"> 删除缓存 </el-button>
-								<el-button icon="ele-DeleteFilled" size="small" type="danger" @click="clearCache" v-auth="'sysCache:clear'"> 清空缓存 </el-button>
-							</el-space>
+							<el-button icon="ele-Delete" size="small" type="danger" @click="delCache" v-auth="'sysCache:delete'"> 删除缓存 </el-button>
 						</div>
 					</template>
-					<vue-json-pretty :data="state.cacheValue" showLength showIcon showLineNumber showSelectController />
+					<vue-json-pretty :data="state.cacheValue" showLength showIcon showLineNumber showSelectController style="padding-bottom: 60px" />
 				</el-card>
 			</pane>
 		</splitpanes>