Commit c881be4e by 赵剑炜

1.删除配置文件中后续不会用到的内容

2.调整swagger,配置swagger中注释内容
3.调整代码批量生成接口
parent 802b022a
......@@ -127,3 +127,10 @@
/Junmp.Platform.WebApi/obj/Debug/net7.0/Junmp.Platform.WebApi.pdb
/Junmp.Platform.WebApi/obj/Debug/net7.0/ref/Junmp.Platform.WebApi.dll
/Junmp.Platform.WebApi/obj/Debug/net7.0/refint/Junmp.Platform.WebApi.dll
/Junmp.Platform.WebApi/bin/Debug/net7.0/ICSharpCode.SharpZipLib.dll
/Junmp.Platform.WebApi/bin/Debug/net7.0/HtmlSanitizer.dll
/Junmp.Platform.WebApi/bin/Debug/net7.0/FluentFTP.dll
/Junmp.Platform.WebApi/bin/Debug/net7.0/FastExpressionCompiler.dll
/Junmp.Platform.WebApi/bin/Debug/net7.0/Enums.NET.dll
/Junmp.Platform.WebApi/bin/Debug/net7.0/Elasticsearch.Net.dll
/Junmp.Platform.WebApi/bin/Debug/net7.0/DotNetCore.CAP.SqlServer.dll
//-----------------------------------------------------------------------
// <Copyright>
// * Copyright (C) 2022 Admin All Rights Reserved
// </Copyright>
//-----------------------------------------------------------------------
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Junmp.Platform.Common.Global;
using Admin.Net.Service.BusinessService.SystemManagement.ScheduleJobService;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Junmp.Platform.Repository.Base;
namespace Admin.Net.WebApi.AppCode.FrameworkClass
{
public class AdminApplication
{
#region 启动业务作业
/// <summary>
/// 启动业务作业
/// </summary>
/// <returns></returns>
public static async Task StartScheduleJobAsync(IApplicationBuilder app)
{
await app.ApplicationServices.GetService<IScheduleJobService>().StartScheduleJobAsync();
}
#endregion
#region 加载系统缓存
/// <summary>
/// 加载系统缓存
/// </summary>
/// <returns></returns>
public static async Task LoadSystemCache(IApplicationBuilder app)
{
//加载计划任务缓存
await app.ApplicationServices.GetService<IScheduleJobService>().LoadBusinessScheduleJobCache();
}
#endregion
#region 清理系统缓存
/// <summary>
/// 清理系统缓存
/// </summary>
/// <returns></returns>
public static async Task ClearSystemCache(IApplicationBuilder app)
{
//清理计划任务缓存
await app.ApplicationServices.GetService<IScheduleJobService>().ClearBusinessScheduleJobCache();
}
#endregion
#region 初始化多租户
/// <summary>
/// 初始化多租户
/// </summary>
/// <returns></returns>
public static async Task InitTenants()
{
await Task.Run(() =>
{
var tenants = AdminGlobalContext.TenantsConfig.TenantsList;
if (tenants.Count > 0)
{
var connectionConfigs = new List<ConnectionConfig>();
foreach (var item in tenants)
{
var onnectionConfig = new ConnectionConfig()
{
ConfigId = item.TenantId,
DbType = (DbType)item.DbType,
ConnectionString = item.ConnectionString,
IsAutoCloseConnection = item.IsAutoCloseConnection,
};
connectionConfigs.Add(onnectionConfig);
}
AdminDbScope.TenantDbContext = new SqlSugarScope(connectionConfigs);
foreach (var item in tenants)
{
AdminDbScope.TenantDbContext.GetConnectionScope(item.TenantId).Aop.OnLogExecuting = (sql, p) =>
{
Console.WriteLine(sql);
};
}
}
});
}
#endregion
}
}
//-----------------------------------------------------------------------
// <Copyright>
// * Copyright (C) 2022 Admin All Rights Reserved
// </Copyright>
//-----------------------------------------------------------------------
using Microsoft.Extensions.Logging;
using Quartz;
using Junmp.Platform.Common.Global;
using Junmp.Platform.Common.Utility;
using System;
using System.Threading.Tasks;
namespace Admin.Net.WebApi.AppCode.FrameworkQuartz
{
[DisallowConcurrentExecution]
public class AdminFrameworkJob : IJob
{
private readonly ILogger<AdminFrameworkJob> _logger;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="logger"></param>
public AdminFrameworkJob(ILogger<AdminFrameworkJob> logger)
{
_logger = logger;
}
/// <summary>
/// 执行框架作业
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Task Execute(IJobExecutionContext context)
{
String time = DateTime.Now.ToString("HH:mm");
if (time.Equals("04:00"))
{
//清理临时文件、释放服务器存储空间
FileContext.ClearDirectory(AdminGlobalContext.DirectoryConfig.GetTempPath());
}
_logger.LogInformation("Admin Framework Job Executed!");
return Task.CompletedTask;
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "7.0.0"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}
\ No newline at end of file
{"ContentRoots":["C:\\项目\\JYZB-Git\\JYZB3.0\\审核\\Junmp.Process\\Junmp.Platform.WebApi\\wwwroot\\"],"Root":{"Children":null,"Asset":null,"Patterns":[{"ContentRootIndex":0,"Pattern":"**","Depth":0}]}}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "7.0.0"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论