Przeglądaj źródła

😁代码调整与优化

zuohuaijun 3 lat temu
rodzic
commit
a127cb25c4

+ 2 - 4
Admin.NET/Admin.NET.Core/Job/DynamicJobCompiler.cs

@@ -12,7 +12,7 @@ public class DynamicJobCompiler : ISingleton
     /// <returns></returns>
     public Type BuildJob(string script)
     {
-        //动态创建作业
+        // 动态创建作业
         var builder = new AssemblyCSharpBuilder("Admin.NET.Core")
         {
             Domain = DomainManagement.Random()
@@ -20,8 +20,6 @@ public class DynamicJobCompiler : ISingleton
 
         builder.Add(script);
 
-        var assembly = builder.GetAssembly();
-        var jobType = assembly.GetTypes().FirstOrDefault(u => typeof(IJob).IsAssignableFrom(u));
-        return jobType;
+        return builder.GetAssembly().GetTypes().FirstOrDefault(u => typeof(IJob).IsAssignableFrom(u));
     }
 }

+ 8 - 5
Admin.NET/Admin.NET.Core/Logging/DatabaseLoggingWriter.cs

@@ -31,12 +31,15 @@ public class DatabaseLoggingWriter : IDatabaseLoggingWriter
         // 获取当前操作者
         var account = "";
         var realName = "";
-        foreach (var item in loggingMonitor.authorizationClaims)
+        if (!string.IsNullOrWhiteSpace(loggingMonitor.authorizationClaims))
         {
-            if (item.type == ClaimConst.Account)
-                account = item.value;
-            if (item.type == ClaimConst.RealName)
-                realName = item.value;
+            foreach (var item in loggingMonitor.authorizationClaims)
+            {
+                if (item.type == ClaimConst.Account)
+                    account = item.value;
+                if (item.type == ClaimConst.RealName)
+                    realName = item.value;
+            }
         }
 
         if (loggingMonitor.actionName == "login")

+ 0 - 18
Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs

@@ -188,22 +188,4 @@ public class SysDictDataService : IDynamicApiController, ITransient
     {
         await _sysDictDataRep.DeleteAsync(u => u.DictTypeId == dictTypeId);
     }
-    /// <summary>
-    /// 根据字典唯一编码获取下拉框集合
-    /// </summary>
-    /// <param name="code"></param>
-    /// <returns></returns>
-    [HttpGet("/sysDictData/DictDataDropdown/{code}")]
-    public async Task<dynamic> GetDictDataDropdown(string code)
-    {
-        return await _sysDictDataRep.Context.Queryable<SysDictType, SysDictData>((a, b) =>
-            new JoinQueryInfos(JoinType.Left, a.Id == b.DictTypeId))
-            .Where(a => a.Code == code)
-            .Where((a, b) => a.Status == StatusEnum.Enable && b.Status == StatusEnum.Enable)
-            .Select((a, b) => new
-            {
-                Label = b.Value,
-                Value = b.Code
-            }).ToListAsync();
-    }
 }

+ 1 - 3
Admin.NET/Admin.NET.Core/Service/Job/DbJobPersistence.cs

@@ -47,7 +47,7 @@ public class DbJobPersistence : IJobPersistence
                 jobDetail = JobBuilder.Create(dbJob.AssemblyName, dbJob.JobType).LoadFrom(dbJob);
             }
 
-            //强行设置为不扫描 IJob 实现类 [Trigger] 特性触发器,否则 SchedulerBuilder.Create 会再次扫描,导致重复添加同名触发器
+            // 强行设置为不扫描 IJob 实现类 [Trigger] 特性触发器,否则 SchedulerBuilder.Create 会再次扫描,导致重复添加同名触发器
             jobDetail.SetIncludeAnnotations(false);
 
             // 加载数据库的触发器
@@ -119,7 +119,6 @@ public class DbJobPersistence : IJobPersistence
         }
         else if (context.Behavior == PersistenceBehavior.Updated)
         {
-            //忽略 Id 和额外自定义的列
             db.Updateable(jobDetail).WhereColumns(u => new { u.JobId }).IgnoreColumns(u => new { u.Id, u.CreateFromScript, u.ScriptCode }).ExecuteCommand();
         }
         else if (context.Behavior == PersistenceBehavior.Removed)
@@ -144,7 +143,6 @@ public class DbJobPersistence : IJobPersistence
         }
         else if (context.Behavior == PersistenceBehavior.Updated)
         {
-            //忽略 Id 和额外自定义的列
             db.Updateable(jobTrigger).WhereColumns(u => new { u.TriggerId, u.JobId }).IgnoreColumns(u => new { u.Id }).ExecuteCommand();
         }
         else if (context.Behavior == PersistenceBehavior.Removed)

+ 5 - 5
Admin.NET/Admin.NET.Core/Service/Job/SysJobService.cs

@@ -84,7 +84,7 @@ public class SysJobService : IDynamicApiController, ITransient
             JobBuilder.Create(jobType).SetIncludeAnnotations(input.IncludeAnnotations)
                 .LoadFrom(input.Adapt<SysJobDetail>()).SetJobType(jobType));
 
-        //延迟一下等待持久化写入,再执行其他字段的更新
+        // 延迟一下等待持久化写入,再执行其他字段的更新
         await Task.Delay(500);
         await _sysJobDetailRep.AsUpdateable()
             .SetColumns(u => new SysJobDetail { CreateFromScript = input.CreateFromScript, ScriptCode = input.ScriptCode })
@@ -134,8 +134,8 @@ public class SysJobService : IDynamicApiController, ITransient
             scheduler?.UpdateDetail(scheduler.GetJobBuilder().LoadFrom(sysJobDetail));
         }
 
-        //tip: 假如这次更新有变更了 JobId,变更 JobId 后触发的持久化更新执行,会由于找不到 JobId 而更新不到数据
-        //延迟一下等待持久化写入,再执行其他字段的更新
+        // Tip: 假如这次更新有变更了 JobId,变更 JobId 后触发的持久化更新执行,会由于找不到 JobId 而更新不到数据
+        // 延迟一下等待持久化写入,再执行其他字段的更新
         await Task.Delay(500);
         await _sysJobDetailRep.UpdateAsync(sysJobDetail);
     }
@@ -150,7 +150,7 @@ public class SysJobService : IDynamicApiController, ITransient
     {
         _schedulerFactory.RemoveJob(input.JobId);
 
-        //如果 _schedulerFactory 中不存在 JodId,则无法触发持久化,下面的代码确保作业和触发器能被删除
+        // 如果 _schedulerFactory 中不存在 JodId,则无法触发持久化,下面的代码确保作业和触发器能被删除
         await _sysJobDetailRep.DeleteAsync(u => u.JobId == input.JobId);
         await _sysJobTriggerRep.DeleteAsync(u => u.JobId == input.JobId);
     }
@@ -216,7 +216,7 @@ public class SysJobService : IDynamicApiController, ITransient
         var scheduler = _schedulerFactory.GetJob(input.JobId);
         scheduler?.RemoveTrigger(input.TriggerId);
 
-        //如果 _schedulerFactory 中不存在 JodId,则无法触发持久化,下行代码确保触发器能被删除
+        // 如果 _schedulerFactory 中不存在 JodId,则无法触发持久化,下行代码确保触发器能被删除
         await _sysJobTriggerRep.DeleteAsync(u => u.JobId == input.JobId && u.TriggerId == input.TriggerId);
     }
 

+ 3 - 3
Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/data.data.ts.vm

@@ -6,7 +6,7 @@ if(@column.EffectType == "Upload"){
 }else if(@column.EffectType == "fk"){
 @:import { get@(@column.FkEntityName)Dropdown } from '/@@/api/main/@(@Model.ClassName)';
 }else if(@column.EffectType == "Select"){
-@:import { getDictDataDropdown } from '/@@/api/sys/admin';
+@:import { getDataList } from '/@@/api/sys/admin';
 }else if(@column.EffectType == "ApiTreeSelect"){
 @:import { get@(@column.FkEntityName)Tree } from '/@@/api/main/@(@Model.ClassName)';
 }else if(@column.EffectType == "ConstSelector"){
@@ -59,7 +59,7 @@ if(@column.EffectType == "fk"){
 }else if(@column.EffectType == "Select"){
     @:component: 'ApiSelect',
     @:componentProps: {
-      @:api: getDictDataDropdown,
+      @:api: getDataList,
       @:params: '@(@column.DictTypeCode)',
       @:fieldNames: {
         @:label: 'label',
@@ -110,7 +110,7 @@ if(@column.EffectType == "fk"){
 }else if(@column.EffectType == "Select"){
     @:component: 'ApiSelect',
     @:componentProps: {
-      @:api: getDictDataDropdown,
+      @:api: getDataList,
       @:params: '@(@column.DictTypeCode)',
       @:fieldNames: {
         @:label: 'label',

+ 4 - 4
Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/editDialog.vue.vm

@@ -115,7 +115,7 @@
 	}
 	@foreach (var column in Model.TableField){
 	if(@column.EffectType == "Select"){
-	@:import { getDictDataDropdown } from '/@@/api/system/admin';
+	@:import { getDictDataList } from '/@@/api/system/admin';
 
 	}
 	}
@@ -186,8 +186,8 @@ const submit = async () => {
 
 @foreach (var column in Model.TableField){
   if(@column.EffectType == "Select"){
-    @:const getDictDataDropdownList = async (val: any) => {
-      @:let list = await getDictDataDropdown(val);
+    @:const dictTypeDataList = async (val: any) => {
+      @:let list = await getDictDataList(val);
       @:return list.data.result ?? [];
     @:};
     break;
@@ -197,7 +197,7 @@ const submit = async () => {
 onMounted(async () => {
 	@foreach (var column in Model.TableField){
 	if(@column.EffectType == "Select"){
-	     @:getEdit@(@column.LowerColumnName)Data.value= await getDictDataDropdownList('@(@column.DictTypeCode)');
+	     @:getEdit@(@column.LowerColumnName)Data.value= await dictTypeDataList('@(@column.DictTypeCode)');
 	 }
 	}
 });

+ 4 - 4
Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm

@@ -149,7 +149,7 @@
 	}
 	@foreach (var column in Model.QueryWhetherList){
 	if(@column.EffectType == "Select"){
-	@:import { getDictDataDropdown } from '/@@/api/system/admin';
+	@:import { getDictDataList } from '/@@/api/system/admin';
 	break;
 	}
 	}
@@ -182,7 +182,7 @@ const queryParams = ref<any>
 	loading.value = false;
 	@foreach (var column in Model.QueryWhetherList){
 	if(@column.EffectType == "Select"){
-	@:get@(@column.LowerColumnName)Data.value = await getDictDataDropdownList('@(@column.DictTypeCode)');
+	@:get@(@column.LowerColumnName)Data.value = await dictTypeDataList('@(@column.DictTypeCode)');
 		}
 	}
 };
@@ -238,8 +238,8 @@ const handleCurrentChange = (val: number) => {
 
 @foreach (var column in Model.QueryWhetherList){
   if(@column.EffectType == "Select"){
-    @:const getDictDataDropdownList = async (val: any) => {
-      @:let list = await getDictDataDropdown(val);
+    @:const dictTypeDataList = async (val: any) => {
+      @:let list = await getDictDataList(val);
       @:return list.data.result ?? [];
     @:};
     break;

+ 0 - 1
Web/src/api-services/api.ts

@@ -23,7 +23,6 @@ export * from './apis/sys-dict-type-api';
 export * from './apis/sys-file-api';
 export * from './apis/sys-job-api';
 export * from './apis/sys-log-diff-api';
-export * from './apis/sys-log-ex-api';
 export * from './apis/sys-log-op-api';
 export * from './apis/sys-log-vis-api';
 export * from './apis/sys-menu-api';

+ 0 - 328
Web/src/api-services/apis/sys-log-ex-api.ts

@@ -1,328 +0,0 @@
-/* tslint:disable */
-/* eslint-disable */
-/**
- * Admin.NET
- * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
- *
- * OpenAPI spec version: 1.0.0
- * Contact: 515096995@qq.com
- *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the class manually.
- */
-import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
-import { Configuration } from '../configuration';
-// Some imports not used depending on template conditions
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
-import { AdminResultBoolean } from '../models';
-import { AdminResultSqlSugarPagedListSysLogEx } from '../models';
-import { LogInput } from '../models';
-/**
- * SysLogExApi - axios parameter creator
- * @export
- */
-export const SysLogExApiAxiosParamCreator = function (configuration?: Configuration) {
-    return {
-        /**
-         * 
-         * @summary 清空异常日志
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        apiSysLogExClearDelete: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/api/sysLogEx/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: 'DELETE', ...baseOptions, ...options};
-            const localVarHeaderParameter = {} as any;
-            const localVarQueryParameter = {} as any;
-
-            // authentication Bearer required
-
-            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 导出异常日志
-         * @param {LogInput} [body] 
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        apiSysLogExExportPost: async (body?: LogInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/api/sysLogEx/export`;
-            // 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
-
-            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
-
-            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};
-            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
-
-            return {
-                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
-                options: localVarRequestOptions,
-            };
-        },
-        /**
-         * 
-         * @summary 获取异常日志分页列表
-         * @param {Date} [startTime] 开始时间
-         * @param {Date} [endTime] 结束时间
-         * @param {number} [page] 当前页码
-         * @param {number} [pageSize] 页码容量
-         * @param {string} [field] 排序字段
-         * @param {string} [order] 排序方向
-         * @param {string} [descStr] 降序排序
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        apiSysLogExPageGet: async (startTime?: Date, endTime?: Date, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/api/sysLogEx/page`;
-            // 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
-
-            if (startTime !== undefined) {
-                localVarQueryParameter['StartTime'] = (startTime as any instanceof Date) ?
-                    (startTime as any).toISOString() :
-                    startTime;
-            }
-
-            if (endTime !== undefined) {
-                localVarQueryParameter['EndTime'] = (endTime as any instanceof Date) ?
-                    (endTime as any).toISOString() :
-                    endTime;
-            }
-
-            if (page !== undefined) {
-                localVarQueryParameter['Page'] = page;
-            }
-
-            if (pageSize !== undefined) {
-                localVarQueryParameter['PageSize'] = pageSize;
-            }
-
-            if (field !== undefined) {
-                localVarQueryParameter['Field'] = field;
-            }
-
-            if (order !== undefined) {
-                localVarQueryParameter['Order'] = order;
-            }
-
-            if (descStr !== undefined) {
-                localVarQueryParameter['DescStr'] = descStr;
-            }
-
-            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,
-            };
-        },
-    }
-};
-
-/**
- * SysLogExApi - functional programming interface
- * @export
- */
-export const SysLogExApiFp = function(configuration?: Configuration) {
-    return {
-        /**
-         * 
-         * @summary 清空异常日志
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async apiSysLogExClearDelete(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultBoolean>>> {
-            const localVarAxiosArgs = await SysLogExApiAxiosParamCreator(configuration).apiSysLogExClearDelete(options);
-            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
-                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
-                return axios.request(axiosRequestArgs);
-            };
-        },
-        /**
-         * 
-         * @summary 导出异常日志
-         * @param {LogInput} [body] 
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async apiSysLogExExportPost(body?: LogInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
-            const localVarAxiosArgs = await SysLogExApiAxiosParamCreator(configuration).apiSysLogExExportPost(body, options);
-            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
-                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
-                return axios.request(axiosRequestArgs);
-            };
-        },
-        /**
-         * 
-         * @summary 获取异常日志分页列表
-         * @param {Date} [startTime] 开始时间
-         * @param {Date} [endTime] 结束时间
-         * @param {number} [page] 当前页码
-         * @param {number} [pageSize] 页码容量
-         * @param {string} [field] 排序字段
-         * @param {string} [order] 排序方向
-         * @param {string} [descStr] 降序排序
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async apiSysLogExPageGet(startTime?: Date, endTime?: Date, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListSysLogEx>>> {
-            const localVarAxiosArgs = await SysLogExApiAxiosParamCreator(configuration).apiSysLogExPageGet(startTime, endTime, page, pageSize, field, order, descStr, options);
-            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
-                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
-                return axios.request(axiosRequestArgs);
-            };
-        },
-    }
-};
-
-/**
- * SysLogExApi - factory interface
- * @export
- */
-export const SysLogExApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
-    return {
-        /**
-         * 
-         * @summary 清空异常日志
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async apiSysLogExClearDelete(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultBoolean>> {
-            return SysLogExApiFp(configuration).apiSysLogExClearDelete(options).then((request) => request(axios, basePath));
-        },
-        /**
-         * 
-         * @summary 导出异常日志
-         * @param {LogInput} [body] 
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async apiSysLogExExportPost(body?: LogInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
-            return SysLogExApiFp(configuration).apiSysLogExExportPost(body, options).then((request) => request(axios, basePath));
-        },
-        /**
-         * 
-         * @summary 获取异常日志分页列表
-         * @param {Date} [startTime] 开始时间
-         * @param {Date} [endTime] 结束时间
-         * @param {number} [page] 当前页码
-         * @param {number} [pageSize] 页码容量
-         * @param {string} [field] 排序字段
-         * @param {string} [order] 排序方向
-         * @param {string} [descStr] 降序排序
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async apiSysLogExPageGet(startTime?: Date, endTime?: Date, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysLogEx>> {
-            return SysLogExApiFp(configuration).apiSysLogExPageGet(startTime, endTime, page, pageSize, field, order, descStr, options).then((request) => request(axios, basePath));
-        },
-    };
-};
-
-/**
- * SysLogExApi - object-oriented interface
- * @export
- * @class SysLogExApi
- * @extends {BaseAPI}
- */
-export class SysLogExApi extends BaseAPI {
-    /**
-     * 
-     * @summary 清空异常日志
-     * @param {*} [options] Override http request option.
-     * @throws {RequiredError}
-     * @memberof SysLogExApi
-     */
-    public async apiSysLogExClearDelete(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultBoolean>> {
-        return SysLogExApiFp(this.configuration).apiSysLogExClearDelete(options).then((request) => request(this.axios, this.basePath));
-    }
-    /**
-     * 
-     * @summary 导出异常日志
-     * @param {LogInput} [body] 
-     * @param {*} [options] Override http request option.
-     * @throws {RequiredError}
-     * @memberof SysLogExApi
-     */
-    public async apiSysLogExExportPost(body?: LogInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
-        return SysLogExApiFp(this.configuration).apiSysLogExExportPost(body, options).then((request) => request(this.axios, this.basePath));
-    }
-    /**
-     * 
-     * @summary 获取异常日志分页列表
-     * @param {Date} [startTime] 开始时间
-     * @param {Date} [endTime] 结束时间
-     * @param {number} [page] 当前页码
-     * @param {number} [pageSize] 页码容量
-     * @param {string} [field] 排序字段
-     * @param {string} [order] 排序方向
-     * @param {string} [descStr] 降序排序
-     * @param {*} [options] Override http request option.
-     * @throws {RequiredError}
-     * @memberof SysLogExApi
-     */
-    public async apiSysLogExPageGet(startTime?: Date, endTime?: Date, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysLogEx>> {
-        return SysLogExApiFp(this.configuration).apiSysLogExPageGet(startTime, endTime, page, pageSize, field, order, descStr, options).then((request) => request(this.axios, this.basePath));
-    }
-}

+ 8 - 8
Web/src/api-services/apis/sys-notice-api.ts

@@ -185,7 +185,7 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
         },
         /**
          * 
-         * @summary 获取接收的通知公告(当前用户)
+         * @summary 获取接收的通知公告
          * @param {string} [title] 标题
          * @param {NoticeTypeEnum} [type] 类型(1通知 2公告)
          * @param {number} [page] 当前页码
@@ -338,7 +338,7 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
         },
         /**
          * 
-         * @summary 获取未读的通知公告(当前用户)
+         * @summary 获取未读的通知公告
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -472,7 +472,7 @@ export const SysNoticeApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 获取接收的通知公告(当前用户)
+         * @summary 获取接收的通知公告
          * @param {string} [title] 标题
          * @param {NoticeTypeEnum} [type] 类型(1通知 2公告)
          * @param {number} [page] 当前页码
@@ -520,7 +520,7 @@ export const SysNoticeApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 获取未读的通知公告(当前用户)
+         * @summary 获取未读的通知公告
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -592,7 +592,7 @@ export const SysNoticeApiFactory = function (configuration?: Configuration, base
         },
         /**
          * 
-         * @summary 获取接收的通知公告(当前用户)
+         * @summary 获取接收的通知公告
          * @param {string} [title] 标题
          * @param {NoticeTypeEnum} [type] 类型(1通知 2公告)
          * @param {number} [page] 当前页码
@@ -628,7 +628,7 @@ export const SysNoticeApiFactory = function (configuration?: Configuration, base
         },
         /**
          * 
-         * @summary 获取未读的通知公告(当前用户)
+         * @summary 获取未读的通知公告
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -696,7 +696,7 @@ export class SysNoticeApi extends BaseAPI {
     }
     /**
      * 
-     * @summary 获取接收的通知公告(当前用户)
+     * @summary 获取接收的通知公告
      * @param {string} [title] 标题
      * @param {NoticeTypeEnum} [type] 类型(1通知 2公告)
      * @param {number} [page] 当前页码
@@ -735,7 +735,7 @@ export class SysNoticeApi extends BaseAPI {
     }
     /**
      * 
-     * @summary 获取未读的通知公告(当前用户)
+     * @summary 获取未读的通知公告
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysNoticeApi

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

@@ -157,7 +157,7 @@ export const SysRegionApiAxiosParamCreator = function (configuration?: Configura
         },
         /**
          * 
-         * @summary 获取行政区域列表
+         * @summary 获取行政区域分页列表
          * @param {number} [pid] 父节点Id
          * @param {string} [name] 名称
          * @param {string} [code] 编码
@@ -361,7 +361,7 @@ export const SysRegionApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 获取行政区域列表
+         * @summary 获取行政区域分页列表
          * @param {number} [pid] 父节点Id
          * @param {string} [name] 名称
          * @param {string} [code] 编码
@@ -448,7 +448,7 @@ export const SysRegionApiFactory = function (configuration?: Configuration, base
         },
         /**
          * 
-         * @summary 获取行政区域列表
+         * @summary 获取行政区域分页列表
          * @param {number} [pid] 父节点Id
          * @param {string} [name] 名称
          * @param {string} [code] 编码
@@ -527,7 +527,7 @@ export class SysRegionApi extends BaseAPI {
     }
     /**
      * 
-     * @summary 获取行政区域列表
+     * @summary 获取行政区域分页列表
      * @param {number} [pid] 父节点Id
      * @param {string} [name] 名称
      * @param {string} [code] 编码

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

@@ -133,7 +133,7 @@ export const SysServerApiAxiosParamCreator = function (configuration?: Configura
         },
         /**
          * 
-         * @summary 获取服务器内存信息
+         * @summary 获取服务器使用信息
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -217,7 +217,7 @@ export const SysServerApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 获取服务器内存信息
+         * @summary 获取服务器使用信息
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -266,7 +266,7 @@ export const SysServerApiFactory = function (configuration?: Configuration, base
         },
         /**
          * 
-         * @summary 获取服务器内存信息
+         * @summary 获取服务器使用信息
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
@@ -315,7 +315,7 @@ export class SysServerApi extends BaseAPI {
     }
     /**
      * 
-     * @summary 获取服务器内存信息
+     * @summary 获取服务器使用信息
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysServerApi

+ 0 - 57
Web/src/api-services/models/admin-result-sql-sugar-paged-list-sys-log-ex.ts

@@ -1,57 +0,0 @@
-/* tslint:disable */
-/* eslint-disable */
-/**
- * Admin.NET
- * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
- *
- * OpenAPI spec version: 1.0.0
- * Contact: 515096995@qq.com
- *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the class manually.
- */
-import { SqlSugarPagedListSysLogEx } from './sql-sugar-paged-list-sys-log-ex';
-/**
- * 全局返回结果
- * @export
- * @interface AdminResultSqlSugarPagedListSysLogEx
- */
-export interface AdminResultSqlSugarPagedListSysLogEx {
-    /**
-     * 状态码
-     * @type {number}
-     * @memberof AdminResultSqlSugarPagedListSysLogEx
-     */
-    code?: number;
-    /**
-     * 类型success、warning、error
-     * @type {string}
-     * @memberof AdminResultSqlSugarPagedListSysLogEx
-     */
-    type?: string | null;
-    /**
-     * 错误信息
-     * @type {string}
-     * @memberof AdminResultSqlSugarPagedListSysLogEx
-     */
-    message?: string | null;
-    /**
-     * 
-     * @type {SqlSugarPagedListSysLogEx}
-     * @memberof AdminResultSqlSugarPagedListSysLogEx
-     */
-    result?: SqlSugarPagedListSysLogEx;
-    /**
-     * 附加数据
-     * @type {any}
-     * @memberof AdminResultSqlSugarPagedListSysLogEx
-     */
-    extras?: any | null;
-    /**
-     * 时间
-     * @type {Date}
-     * @memberof AdminResultSqlSugarPagedListSysLogEx
-     */
-    time?: Date;
-}

+ 0 - 4
Web/src/api-services/models/index.ts

@@ -53,7 +53,6 @@ export * from './admin-result-sql-sugar-paged-list-sys-dict-data';
 export * from './admin-result-sql-sugar-paged-list-sys-dict-type';
 export * from './admin-result-sql-sugar-paged-list-sys-file';
 export * from './admin-result-sql-sugar-paged-list-sys-log-diff';
-export * from './admin-result-sql-sugar-paged-list-sys-log-ex';
 export * from './admin-result-sql-sugar-paged-list-sys-log-op';
 export * from './admin-result-sql-sugar-paged-list-sys-log-vis';
 export * from './admin-result-sql-sugar-paged-list-sys-notice';
@@ -121,7 +120,6 @@ export * from './job-trigger-input';
 export * from './log-input';
 export * from './login-input';
 export * from './login-output';
-export * from './login-type-enum';
 export * from './login-user-output';
 export * from './menu-output';
 export * from './menu-type-enum';
@@ -145,7 +143,6 @@ export * from './sql-sugar-paged-list-sys-dict-data';
 export * from './sql-sugar-paged-list-sys-dict-type';
 export * from './sql-sugar-paged-list-sys-file';
 export * from './sql-sugar-paged-list-sys-log-diff';
-export * from './sql-sugar-paged-list-sys-log-ex';
 export * from './sql-sugar-paged-list-sys-log-op';
 export * from './sql-sugar-paged-list-sys-log-vis';
 export * from './sql-sugar-paged-list-sys-notice';
@@ -172,7 +169,6 @@ export * from './sys-job-cluster';
 export * from './sys-job-detail';
 export * from './sys-job-trigger';
 export * from './sys-log-diff';
-export * from './sys-log-ex';
 export * from './sys-log-op';
 export * from './sys-log-vis';
 export * from './sys-menu';

+ 0 - 26
Web/src/api-services/models/login-type-enum.ts

@@ -1,26 +0,0 @@
-/* tslint:disable */
-/* eslint-disable */
-/**
- * Admin.NET
- * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
- *
- * OpenAPI spec version: 1.0.0
- * Contact: 515096995@qq.com
- *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the class manually.
- */
-/**
- * 登录类型枚举<br />&nbsp;登录 Login = 1<br />&nbsp;退出 Logout = 2<br />&nbsp;注册 Register = 3<br />&nbsp;改密 ChangePassword = 4<br />&nbsp;授权登陆 AuthorizedLogin = 5<br />
- * @export
- * @enum {string}
- */
-export enum LoginTypeEnum {
-    NUMBER_1 = 1,
-    NUMBER_2 = 2,
-    NUMBER_3 = 3,
-    NUMBER_4 = 4,
-    NUMBER_5 = 5
-}
-

+ 0 - 63
Web/src/api-services/models/sql-sugar-paged-list-sys-log-ex.ts

@@ -1,63 +0,0 @@
-/* tslint:disable */
-/* eslint-disable */
-/**
- * Admin.NET
- * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
- *
- * OpenAPI spec version: 1.0.0
- * Contact: 515096995@qq.com
- *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the class manually.
- */
-import { SysLogEx } from './sys-log-ex';
-/**
- * 分页泛型集合
- * @export
- * @interface SqlSugarPagedListSysLogEx
- */
-export interface SqlSugarPagedListSysLogEx {
-    /**
-     * 页码
-     * @type {number}
-     * @memberof SqlSugarPagedListSysLogEx
-     */
-    page?: number;
-    /**
-     * 页容量
-     * @type {number}
-     * @memberof SqlSugarPagedListSysLogEx
-     */
-    pageSize?: number;
-    /**
-     * 总条数
-     * @type {number}
-     * @memberof SqlSugarPagedListSysLogEx
-     */
-    total?: number;
-    /**
-     * 总页数
-     * @type {number}
-     * @memberof SqlSugarPagedListSysLogEx
-     */
-    totalPages?: number;
-    /**
-     * 当前页集合
-     * @type {Array<SysLogEx>}
-     * @memberof SqlSugarPagedListSysLogEx
-     */
-    items?: Array<SysLogEx> | null;
-    /**
-     * 是否有上一页
-     * @type {boolean}
-     * @memberof SqlSugarPagedListSysLogEx
-     */
-    hasPrevPage?: boolean;
-    /**
-     * 是否有下一页
-     * @type {boolean}
-     * @memberof SqlSugarPagedListSysLogEx
-     */
-    hasNextPage?: boolean;
-}

+ 1 - 1
Web/src/api-services/models/sys-log-diff.ts

@@ -94,5 +94,5 @@ export interface SysLogDiff {
      * @type {number}
      * @memberof SysLogDiff
      */
-    duration?: number;
+    elapsed?: number;
 }

+ 0 - 122
Web/src/api-services/models/sys-log-ex.ts

@@ -1,122 +0,0 @@
-/* tslint:disable */
-/* eslint-disable */
-/**
- * Admin.NET
- * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
- *
- * OpenAPI spec version: 1.0.0
- * Contact: 515096995@qq.com
- *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
- * Do not edit the class manually.
- */
-/**
- * 系统异常日志表
- * @export
- * @interface SysLogEx
- */
-export interface SysLogEx {
-    /**
-     * 雪花Id
-     * @type {number}
-     * @memberof SysLogEx
-     */
-    id?: number;
-    /**
-     * 创建时间
-     * @type {Date}
-     * @memberof SysLogEx
-     */
-    createTime?: Date | null;
-    /**
-     * 更新时间
-     * @type {Date}
-     * @memberof SysLogEx
-     */
-    updateTime?: Date | null;
-    /**
-     * 创建者Id
-     * @type {number}
-     * @memberof SysLogEx
-     */
-    createUserId?: number | null;
-    /**
-     * 修改者Id
-     * @type {number}
-     * @memberof SysLogEx
-     */
-    updateUserId?: number | null;
-    /**
-     * 软删除
-     * @type {boolean}
-     * @memberof SysLogEx
-     */
-    isDelete?: boolean;
-    /**
-     * 租户Id
-     * @type {number}
-     * @memberof SysLogEx
-     */
-    tenantId?: number | null;
-    /**
-     * 记录器类别名称
-     * @type {string}
-     * @memberof SysLogEx
-     */
-    logName?: string | null;
-    /**
-     * 日志级别
-     * @type {string}
-     * @memberof SysLogEx
-     */
-    logLevel?: string | null;
-    /**
-     * 事件Id
-     * @type {string}
-     * @memberof SysLogEx
-     */
-    eventId?: string | null;
-    /**
-     * 日志消息
-     * @type {string}
-     * @memberof SysLogEx
-     */
-    message?: string | null;
-    /**
-     * 异常对象
-     * @type {string}
-     * @memberof SysLogEx
-     */
-    exception?: string | null;
-    /**
-     * 当前状态值
-     * @type {string}
-     * @memberof SysLogEx
-     */
-    state?: string | null;
-    /**
-     * 日志记录时间
-     * @type {Date}
-     * @memberof SysLogEx
-     */
-    logDateTime?: Date;
-    /**
-     * 线程Id
-     * @type {number}
-     * @memberof SysLogEx
-     */
-    threadId?: number;
-    /**
-     * 请求跟踪Id
-     * @type {string}
-     * @memberof SysLogEx
-     */
-    traceId?: string | null;
-    /**
-     * 是否使用UTC时间戳
-     * @type {boolean}
-     * @memberof SysLogEx
-     */
-    useUtcTimestamp?: boolean;
-}

+ 95 - 17
Web/src/api-services/models/sys-log-op.ts

@@ -60,53 +60,125 @@ export interface SysLogOp {
      */
     tenantId?: number | null;
     /**
-     * 记录器类别名称
+     * 模块名称
      * @type {string}
      * @memberof SysLogOp
      */
-    logName?: string | null;
+    controllerName?: string | null;
     /**
-     * 日志级别
+     * 方法名称
      * @type {string}
      * @memberof SysLogOp
      */
-    logLevel?: string | null;
+    actionName?: string | null;
     /**
-     * 事件Id
+     * 显示名称
      * @type {string}
      * @memberof SysLogOp
      */
-    eventId?: string | null;
+    displayTitle?: string | null;
     /**
-     * 日志消息
+     * 执行状态
      * @type {string}
      * @memberof SysLogOp
      */
-    message?: string | null;
+    status?: string | null;
     /**
-     * 异常对象
+     * IP地址
      * @type {string}
      * @memberof SysLogOp
      */
-    exception?: string | null;
+    remoteIp?: string | null;
+    /**
+     * 登录地点
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    location?: string | null;
+    /**
+     * 经度
+     * @type {number}
+     * @memberof SysLogOp
+     */
+    longitude?: number | null;
+    /**
+     * 维度
+     * @type {number}
+     * @memberof SysLogOp
+     */
+    latitude?: number | null;
     /**
-     * 当前状态值
+     * 浏览器
      * @type {string}
      * @memberof SysLogOp
      */
-    state?: string | null;
+    browser?: string | null;
     /**
-     * 日志记录时间
+     * 操作系统
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    os?: string | null;
+    /**
+     * 操作用时
+     * @type {number}
+     * @memberof SysLogOp
+     */
+    elapsed?: number;
+    /**
+     * 日志时间
      * @type {Date}
      * @memberof SysLogOp
      */
     logDateTime?: Date;
+    /**
+     * 账号
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    account?: string | null;
+    /**
+     * 真实姓名
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    realName?: string | null;
+    /**
+     * 请求方式
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    httpMethod?: string | null;
+    /**
+     * 请求地址
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    requestUrl?: string | null;
+    /**
+     * 请求参数
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    requestParam?: string | null;
+    /**
+     * 返回结果
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    returnResult?: string | null;
+    /**
+     * 事件Id
+     * @type {number}
+     * @memberof SysLogOp
+     */
+    eventId?: number | null;
     /**
      * 线程Id
      * @type {number}
      * @memberof SysLogOp
      */
-    threadId?: number;
+    threadId?: number | null;
     /**
      * 请求跟踪Id
      * @type {string}
@@ -114,9 +186,15 @@ export interface SysLogOp {
      */
     traceId?: string | null;
     /**
-     * 是否使用UTC时间戳
-     * @type {boolean}
+     * 异常信息
+     * @type {string}
      * @memberof SysLogOp
      */
-    useUtcTimestamp?: boolean;
+    exception?: string | null;
+    /**
+     * 日志消息Json
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    message?: string | null;
 }

+ 40 - 12
Web/src/api-services/models/sys-log-vis.ts

@@ -11,8 +11,6 @@
  * https://github.com/swagger-api/swagger-codegen.git
  * Do not edit the class manually.
  */
-import { LoginTypeEnum } from './login-type-enum';
-import { YesNoEnum } from './yes-no-enum';
 /**
  * 系统访问日志表
  * @export
@@ -62,29 +60,53 @@ export interface SysLogVis {
      */
     tenantId?: number | null;
     /**
-     * 
-     * @type {YesNoEnum}
+     * 模块名称
+     * @type {string}
+     * @memberof SysLogVis
+     */
+    controllerName?: string | null;
+    /**
+     * 方法名称
+     * @type {string}
      * @memberof SysLogVis
      */
-    success?: YesNoEnum;
+    actionName?: string | null;
     /**
-     * 具体消息
+     * 显示名称
      * @type {string}
      * @memberof SysLogVis
      */
-    message?: string | null;
+    displayTitle?: string | null;
+    /**
+     * 执行状态
+     * @type {string}
+     * @memberof SysLogVis
+     */
+    status?: string | null;
     /**
      * IP地址
      * @type {string}
      * @memberof SysLogVis
      */
-    ip?: string | null;
+    remoteIp?: string | null;
     /**
-     * 地址
+     * 登录地点
      * @type {string}
      * @memberof SysLogVis
      */
     location?: string | null;
+    /**
+     * 经度
+     * @type {number}
+     * @memberof SysLogVis
+     */
+    longitude?: number | null;
+    /**
+     * 维度
+     * @type {number}
+     * @memberof SysLogVis
+     */
+    latitude?: number | null;
     /**
      * 浏览器
      * @type {string}
@@ -98,11 +120,17 @@ export interface SysLogVis {
      */
     os?: string | null;
     /**
-     * 
-     * @type {LoginTypeEnum}
+     * 操作用时
+     * @type {number}
+     * @memberof SysLogVis
+     */
+    elapsed?: number;
+    /**
+     * 日志时间
+     * @type {Date}
      * @memberof SysLogVis
      */
-    visType?: LoginTypeEnum;
+    logDateTime?: Date;
     /**
      * 账号
      * @type {string}

+ 3 - 3
Web/src/api/system/admin.ts

@@ -1,10 +1,10 @@
 import request from '/@/utils/request';
 enum Api {
-    DictTypeDataList = '/sysDictData/DictDataDropdown',
+    DictTypeDataList = '/sysDictData/DataList',
 }
 
-// 增加配置金蝶云信息
-export const getDictDataDropdown = (params?: any) =>
+// 根据字典类型编码获取字典值集合
+export const getDictDataList = (params?: any) =>
 	request({
 		url: `${Api.DictTypeDataList}/${params}`,
 		method: 'get'