mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 14:04:41 +08:00
修复生成业务代码异常
优化代码,删除columnHeaders
This commit is contained in:
parent
9fd0405721
commit
1c699eda26
@ -38,11 +38,6 @@ namespace OpenAuth.App.Response
|
||||
/// </summary>
|
||||
public int count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回的列表头信息(已过时,请使用columnFields代替)
|
||||
/// </summary>
|
||||
[Obsolete("请使用ColumnFields以获得更丰富的配置信息")]
|
||||
public List<KeyDescription> columnHeaders;
|
||||
|
||||
/// <summary>
|
||||
/// 返回的表格列定义
|
||||
@ -59,7 +54,6 @@ namespace OpenAuth.App.Response
|
||||
{
|
||||
code = 200;
|
||||
msg = "加载成功";
|
||||
columnHeaders = new List<KeyDescription>();
|
||||
columnFields = new List<BuilderTableColumn>();
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ namespace OpenAuth.App
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(_webProject))
|
||||
if (!string.IsNullOrEmpty(_webProject))
|
||||
return _webProject;
|
||||
_webProject = ProjectPath.GetLastIndexOfDirectoryName(".WebApi") ??
|
||||
ProjectPath.GetLastIndexOfDirectoryName("Api") ??
|
||||
|
@ -567,7 +567,7 @@ namespace OpenAuth.App
|
||||
+ "` ( Id varchar(50) not null primary key,") ; //主键
|
||||
|
||||
|
||||
string sqlDefault = "";
|
||||
// string sqlDefault = "";
|
||||
|
||||
foreach (var json in jsonArray)
|
||||
{
|
||||
|
@ -7,6 +7,9 @@ using Quartz;
|
||||
|
||||
namespace OpenAuth.App.HostedService
|
||||
{
|
||||
/// <summary>
|
||||
/// 自启动服务,本服务用于启动所有状态为【正在运行】的定时任务
|
||||
/// </summary>
|
||||
public class QuartzService : IHostedService, IDisposable
|
||||
{
|
||||
private readonly ILogger<QuartzService> _logger;
|
||||
@ -23,15 +26,15 @@ namespace OpenAuth.App.HostedService
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
_scheduler.Start();
|
||||
_openJobApp.StartAll();
|
||||
return Task.CompletedTask;
|
||||
var result = _openJobApp.StartAll();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
_scheduler.Shutdown();
|
||||
var result =_scheduler.Shutdown();
|
||||
_logger.LogInformation("关闭定时job");
|
||||
return Task.CompletedTask;
|
||||
return result;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
@ -176,10 +176,12 @@ namespace OpenAuth.App.SSO
|
||||
_cacheContext.Remove(token);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -40,7 +40,7 @@ namespace OpenAuth.App.Test
|
||||
{
|
||||
Console.WriteLine($"开始异步测试");
|
||||
|
||||
AddOrUpdate();
|
||||
var result =AddOrUpdate();
|
||||
|
||||
Console.WriteLine("异步测试结束");
|
||||
|
||||
|
@ -93,7 +93,8 @@ namespace OpenAuth.App
|
||||
|
||||
|
||||
|
||||
var userViews = userOrgs.ToList().GroupBy(b => b.Account).Select(u =>new UserView
|
||||
var userViews = (await userOrgs.ToListAsync()).GroupBy(b => b.Account)
|
||||
.Select(u =>new UserView
|
||||
{
|
||||
Id = u.First().Id,
|
||||
Account = u.Key,
|
||||
@ -159,7 +160,7 @@ namespace OpenAuth.App
|
||||
userOrgs = userOrgs.Where(u => u.Key == Define.USERORG && u.OrgId == request.orgId);
|
||||
}
|
||||
|
||||
var userViews = userOrgs.ToList().GroupBy(b => b.Account).Select(u =>new UserView
|
||||
var userViews = (await userOrgs.ToListAsync()).GroupBy(b => b.Account).Select(u =>new UserView
|
||||
{
|
||||
Id = u.First().Id,
|
||||
Account = u.Key,
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using OpenAuth.App.Interface;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.Response;
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using OpenAuth.App.Interface;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.Response;
|
||||
|
Loading…
Reference in New Issue
Block a user