V1.0.6
添加重置用户每月的免费换绑次数 优化项目结构
This commit is contained in:
parent
a23984c9f5
commit
a37c40a2ef
@ -1,9 +1,4 @@
|
|||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace LMS.Common.Attributes
|
namespace LMS.Common.Attributes
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
|
using LMS.Common.Enums;
|
||||||
using LMS.Common.Enum;
|
|
||||||
|
|
||||||
namespace LMS.Common.Dictionary;
|
namespace LMS.Common.Dictionary;
|
||||||
|
|
||||||
@ -37,6 +36,11 @@ public class AllOptions
|
|||||||
/// 邮件设置相关 Option
|
/// 邮件设置相关 Option
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string MailSetting = "mailSetting";
|
public const string MailSetting = "mailSetting";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重置免费次数相关的 Option
|
||||||
|
/// </summary>
|
||||||
|
public const string ResetFreeCount = "resetFreeCount";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly Dictionary<string, List<string>> AllOptionsRequestQuery = new()
|
public static readonly Dictionary<string, List<string>> AllOptionsRequestQuery = new()
|
||||||
@ -46,6 +50,7 @@ public class AllOptions
|
|||||||
{ AllOptionKey.Software, ["LaitoolHomePage", "LaitoolNotice", "LaitoolUpdateContent","LaitoolVersion"]},
|
{ AllOptionKey.Software, ["LaitoolHomePage", "LaitoolNotice", "LaitoolUpdateContent","LaitoolVersion"]},
|
||||||
{ AllOptionKey.Trial , ["LaiToolTrialDays"] },
|
{ AllOptionKey.Trial , ["LaiToolTrialDays"] },
|
||||||
{ AllOptionKey.Image, [OptionKeyName.LaitoolFluxApiModelList] },
|
{ AllOptionKey.Image, [OptionKeyName.LaitoolFluxApiModelList] },
|
||||||
{ AllOptionKey.MailSetting , [OptionKeyName.SMTPMailSetting] }
|
{ AllOptionKey.MailSetting , [OptionKeyName.SMTPMailSetting] },
|
||||||
|
{ AllOptionKey.ResetFreeCount, [OptionKeyName.ResetFreeCountSetting] }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
|
|
||||||
namespace LMS.Common.Dictionary;
|
namespace LMS.Common.Dictionary;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace LMS.Common.Enum;
|
namespace LMS.Common.Enums;
|
||||||
|
|
||||||
public enum OptionTypeEnum
|
public enum OptionTypeEnum
|
||||||
{
|
{
|
||||||
@ -24,4 +24,9 @@ public static class OptionKeyName
|
|||||||
/// 是否开启邮箱服务
|
/// 是否开启邮箱服务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string EnableMailService = "EnableMailService";
|
public const string EnableMailService = "EnableMailService";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重置用户免费次数的setting
|
||||||
|
/// </summary>
|
||||||
|
public const string ResetFreeCountSetting = "ResetFreeCountSetting";
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace LMS.Common.Enum
|
namespace LMS.Common.Enums
|
||||||
{
|
{
|
||||||
public class SoftwareControlEnum
|
public class SoftwareControlEnum
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace LMS.Tools.Extensions
|
namespace LMS.Common.Extensions
|
||||||
{
|
{
|
||||||
public class BeijingTimeExtension
|
public class BeijingTimeExtension
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace LMS.Tools.Extensions
|
namespace LMS.Common.Extensions
|
||||||
{
|
{
|
||||||
public class ConvertExtension
|
public class ConvertExtension
|
||||||
{
|
{
|
||||||
@ -1,7 +1,6 @@
|
|||||||
using LMS.Common.Attributes;
|
using LMS.Common.Attributes;
|
||||||
using static LMS.Common.Enums.PermissionEnum;
|
|
||||||
|
|
||||||
namespace LMS.Tools
|
namespace LMS.Common.Extensions
|
||||||
{
|
{
|
||||||
public static class EnumExtensions
|
public static class EnumExtensions
|
||||||
{
|
{
|
||||||
@ -16,7 +16,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\LMS.Common\LMS.Common.csproj" />
|
<ProjectReference Include="..\LMS.Common\LMS.Common.csproj" />
|
||||||
<ProjectReference Include="..\LMS.Repository\LMS.Repository.csproj" />
|
<ProjectReference Include="..\LMS.Repository\LMS.Repository.csproj" />
|
||||||
<ProjectReference Include="..\LMS.Tools\LMS.Tools.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using LMS.Tools.Extensions;
|
using LMS.Common.Extensions;
|
||||||
|
|
||||||
namespace LMS.Repository.Models.DB
|
namespace LMS.Repository.Models.DB
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using static LMS.Common.Enums.MachineEnum;
|
using static LMS.Common.Enums.MachineEnum;
|
||||||
|
|
||||||
namespace LMS.Repository.Models.DB
|
namespace LMS.Repository.DB
|
||||||
{
|
{
|
||||||
public class Machine
|
public class Machine
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace LMS.Repository.DB;
|
namespace LMS.Repository.DB;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using LMS.Common.Enums;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using static LMS.Common.Enums.PermissionEnum;
|
using static LMS.Common.Enums.PermissionEnum;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using LMS.Common.Enums;
|
using LMS.Common.Enums;
|
||||||
using static LMS.Common.Enums.PermissionEnum;
|
|
||||||
|
|
||||||
namespace LMS.Repository.Models.DB
|
namespace LMS.Repository.Models.DB
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using LMS.Tools.Extensions;
|
using LMS.Common.Extensions;
|
||||||
|
|
||||||
namespace LMS.Repository.DB
|
namespace LMS.Repository.DB
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using LMS.Repository.User;
|
using LMS.Common.Extensions;
|
||||||
using LMS.Tools.Extensions;
|
using LMS.Repository.User;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DB;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.DTO.UserDto;
|
||||||
|
using LMS.Repository.Machine;
|
||||||
|
|
||||||
namespace LMS.Repository.DTO
|
namespace LMS.Repository.DTO
|
||||||
{
|
{
|
||||||
public class MachineDetailDto : Machine
|
public class MachineDetailDto : MachineModel
|
||||||
{
|
{
|
||||||
public UserBaseDto? CreatedUser { get; set; }
|
public UserBaseDto? CreatedUser { get; set; }
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using static LMS.Common.Enums.MachineEnum;
|
using static LMS.Common.Enums.MachineEnum;
|
||||||
|
|
||||||
namespace LMS.Repository.DTO.MachineResponse
|
namespace LMS.Repository.DTO
|
||||||
{
|
{
|
||||||
public class MachineDto
|
public class MachineDto
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace LMS.Repository.DTO;
|
namespace LMS.Repository.DTO;
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\LMS.Tools\LMS.Tools.csproj" />
|
<ProjectReference Include="..\LMS.Common\LMS.Common.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using static LMS.Common.Enums.MachineEnum;
|
using static LMS.Common.Enums.MachineEnum;
|
||||||
|
|
||||||
namespace LMS.Repository.Models.Machine
|
namespace LMS.Repository.Machine
|
||||||
{
|
{
|
||||||
public class MachineModel
|
public class MachineModel
|
||||||
{
|
{
|
||||||
|
|||||||
9
LMS.Repository/Options/ResetUserFreeCountSettingModel.cs
Normal file
9
LMS.Repository/Options/ResetUserFreeCountSettingModel.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace LMS.Repository.Options
|
||||||
|
{
|
||||||
|
public class ResetUserFreeCountSettingModel
|
||||||
|
{
|
||||||
|
public bool EnableMonthlyReset { get; set; } = false;
|
||||||
|
|
||||||
|
public int OnceFreeCount { get; set; } = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using static LMS.Common.Enums.PermissionEnum;
|
using static LMS.Common.Enums.PermissionEnum;
|
||||||
|
|
||||||
namespace LMS.Repository.RequestModel.Permission
|
namespace LMS.Repository.Promission
|
||||||
{
|
{
|
||||||
public class PermissionModel
|
public class PermissionModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using static LMS.Common.Enums.PermissionEnum;
|
using static LMS.Common.Enums.PermissionEnum;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace LMS.Repository.Models.Promission
|
namespace LMS.Repository.Promission
|
||||||
{
|
{
|
||||||
public class PermissionTypeModel
|
public class PermissionTypeModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
|
|
||||||
namespace LMS.Repository.Software
|
namespace LMS.Repository.Software
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\LMS.Common\LMS.Common.csproj" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.8" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\LMS.DAO\LMS.DAO.csproj" />
|
||||||
|
<ProjectReference Include="..\LMS.Repository\LMS.Repository.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
67
LMS.Tools/TaskScheduler/ResetUserFreeCount.cs
Normal file
67
LMS.Tools/TaskScheduler/ResetUserFreeCount.cs
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
using Quartz;
|
||||||
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using LMS.Repository.Models.DB;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using LMS.Repository.DB;
|
||||||
|
using LMS.DAO;
|
||||||
|
using LMS.Common.Enums;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using LMS.Repository.Options;
|
||||||
|
|
||||||
|
namespace LMS.Tools.TaskScheduler;
|
||||||
|
|
||||||
|
[DisallowConcurrentExecution]
|
||||||
|
public class ResetUserFreeCount(ILogger<ResetUserFreeCount> logger, UserManager<User> userManager, ApplicationDbContext context) : IJob
|
||||||
|
{
|
||||||
|
private readonly ILogger<ResetUserFreeCount> _logger = logger;
|
||||||
|
private readonly UserManager<User> _userManager = userManager;
|
||||||
|
private readonly ApplicationDbContext _context = context;
|
||||||
|
|
||||||
|
public async Task Execute(IJobExecutionContext context)
|
||||||
|
{
|
||||||
|
_logger.LogInformation($"开始执行月度任务 - 当前时间: {DateTime.Now}");
|
||||||
|
await ProcessResetUserFreeCount();
|
||||||
|
_logger.LogInformation($"月度任务执行完成 - 当前时间: {DateTime.Now}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ProcessResetUserFreeCount()
|
||||||
|
{
|
||||||
|
using var transaction = await _context.Database.BeginTransactionAsync();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 这里是您的业务逻辑
|
||||||
|
_logger.LogInformation("正在重置用户余换绑次数数据...");
|
||||||
|
|
||||||
|
// 加载Options
|
||||||
|
Options? options = await _context.Options.FirstOrDefaultAsync(x => x.Key == OptionKeyName.ResetFreeCountSetting) ?? throw new Exception("未找到重置用户免费次数的设置,请检查!");
|
||||||
|
|
||||||
|
ResetUserFreeCountSettingModel resetFreeCountSetting = options.GetValueObject<ResetUserFreeCountSettingModel>() ?? new ResetUserFreeCountSettingModel();
|
||||||
|
if (resetFreeCountSetting.EnableMonthlyReset == false)
|
||||||
|
{
|
||||||
|
// 不允许重置
|
||||||
|
_logger.LogInformation("未开启用户重置换绑次数,有需要请开启!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有用户
|
||||||
|
List<User> users = await _userManager.Users.ToListAsync();
|
||||||
|
|
||||||
|
// 修改所有的用户的免费次数
|
||||||
|
foreach (User user in users)
|
||||||
|
{
|
||||||
|
long machineCount = user.AllDeviceCount;
|
||||||
|
user.FreeCount = resetFreeCountSetting.OnceFreeCount * machineCount;
|
||||||
|
await _userManager.UpdateAsync(user);
|
||||||
|
}
|
||||||
|
await transaction.CommitAsync();
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
_logger.LogInformation("重置用户余换绑次数数据成功!");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await transaction.RollbackAsync();
|
||||||
|
_logger.LogError(ex, "月度任务执行失败");
|
||||||
|
throw; // 重新抛出异常以便 Quartz 记录作业失败
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
using LMS.Tools;
|
using LMS.Common.Extensions;
|
||||||
using static LMS.Common.Enums.ResponseCodeEnum;
|
using static LMS.Common.Enums.ResponseCodeEnum;
|
||||||
|
|
||||||
namespace LMS.service
|
namespace LMS.service
|
||||||
|
|||||||
@ -4,12 +4,11 @@ using LMS.Repository.DTO;
|
|||||||
using LMS.Repository.DTO.PromptDto;
|
using LMS.Repository.DTO.PromptDto;
|
||||||
using LMS.Repository.DTO.PromptTypeDto;
|
using LMS.Repository.DTO.PromptTypeDto;
|
||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DTO.UserDto;
|
||||||
|
using LMS.Repository.Machine;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Models.Machine;
|
using LMS.Repository.Promission;
|
||||||
using LMS.Repository.Models.Promission;
|
|
||||||
using LMS.Repository.PromptModel;
|
using LMS.Repository.PromptModel;
|
||||||
using LMS.Repository.RequestModel.Permission;
|
using static LMS.Repository.DTO.MachineDto;
|
||||||
using static LMS.Repository.DTO.MachineResponse.MachineDto;
|
|
||||||
|
|
||||||
namespace Lai_server.Configuration
|
namespace Lai_server.Configuration
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.Repository.DB;
|
using LMS.Repository.DB;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
@ -103,7 +103,8 @@ public class DatabaseConfiguration(IServiceProvider serviceProvider) : IHostedSe
|
|||||||
new Options { Key = "LaiToolTrialDays", Value = "2" , Type = OptionTypeEnum.Number},
|
new Options { Key = "LaiToolTrialDays", Value = "2" , Type = OptionTypeEnum.Number},
|
||||||
new Options { Key = OptionKeyName.LaitoolFluxApiModelList, Value = "{}" , Type = OptionTypeEnum.JSON },
|
new Options { Key = OptionKeyName.LaitoolFluxApiModelList, Value = "{}" , Type = OptionTypeEnum.JSON },
|
||||||
new Options {Key = OptionKeyName.EnableMailService, Value = false.ToString(), Type = OptionTypeEnum.Boolean},
|
new Options {Key = OptionKeyName.EnableMailService, Value = false.ToString(), Type = OptionTypeEnum.Boolean},
|
||||||
new Options {Key = OptionKeyName.SMTPMailSetting, Value ="{}" , Type = OptionTypeEnum.JSON }
|
new Options {Key = OptionKeyName.SMTPMailSetting, Value ="{}" , Type = OptionTypeEnum.JSON },
|
||||||
|
new Options { Key = OptionKeyName.ResetFreeCountSetting, Value = "{}", Type = OptionTypeEnum.JSON},
|
||||||
];
|
];
|
||||||
|
|
||||||
// 遍历所有的配置项,如果没有则添加
|
// 遍历所有的配置项,如果没有则添加
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using LMS.Common.RSAKey;
|
using LMS.Common.Extensions;
|
||||||
|
using LMS.Common.RSAKey;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.Repository.DB;
|
using LMS.Repository.DB;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace LMS.service.Configuration.InitConfiguration
|
namespace LMS.service.Configuration.InitConfiguration
|
||||||
|
|||||||
62
LMS.service/Configuration/QuartzTaskSchedulerConfig.cs
Normal file
62
LMS.service/Configuration/QuartzTaskSchedulerConfig.cs
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
using LMS.Tools.TaskScheduler;
|
||||||
|
using Quartz;
|
||||||
|
namespace LMS.service.Configuration
|
||||||
|
{
|
||||||
|
public static class QuartzTaskSchedulerConfig
|
||||||
|
{
|
||||||
|
public static void AddQuartzTaskSchedulerService(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
// 注册 Quartz 服务
|
||||||
|
services.AddQuartz(q =>
|
||||||
|
{
|
||||||
|
|
||||||
|
// 配置作业
|
||||||
|
var jobKey = new JobKey("MonthlyTask", "DefaultGroup");
|
||||||
|
|
||||||
|
// 方法1:通过配置属性设置时区
|
||||||
|
// 获取中国时区
|
||||||
|
TimeZoneInfo chinaTimeZone;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 尝试获取 Windows 时区名称
|
||||||
|
chinaTimeZone = TimeZoneInfo.FindSystemTimeZoneById("China Standard Time");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 尝试获取 Linux 时区名称
|
||||||
|
chinaTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Asia/Shanghai");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// 如果都不可用,使用 UTC+8
|
||||||
|
chinaTimeZone = TimeZoneInfo.CreateCustomTimeZone(
|
||||||
|
"China_Custom",
|
||||||
|
new TimeSpan(8, 0, 0),
|
||||||
|
"China Custom Time",
|
||||||
|
"China Standard Time");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加作业
|
||||||
|
q.AddJob<ResetUserFreeCount>(opts => opts.WithIdentity(jobKey));
|
||||||
|
|
||||||
|
// 添加触发器 - 每月1号凌晨0点执行
|
||||||
|
q.AddTrigger(opts => opts
|
||||||
|
.ForJob(jobKey)
|
||||||
|
.WithIdentity("MonthlyTaskTrigger", "DefaultGroup")
|
||||||
|
.WithCronSchedule("0 0 18 24 * ?")); // 每月1号凌晨0点
|
||||||
|
});
|
||||||
|
|
||||||
|
// 添加 Quartz 托管服务
|
||||||
|
services.AddQuartzHostedService(options =>
|
||||||
|
{
|
||||||
|
options.WaitForJobsToComplete = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 注册作业
|
||||||
|
services.AddTransient<ResetUserFreeCount>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,14 +1,14 @@
|
|||||||
using LMS.Repository.DTO;
|
using LMS.Common.Extensions;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.DB;
|
||||||
using LMS.Repository.Models.Machine;
|
using LMS.Repository.DTO;
|
||||||
|
using LMS.Repository.Machine;
|
||||||
using LMS.service.Service;
|
using LMS.service.Service;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using static LMS.Common.Enums.MachineEnum;
|
using static LMS.Common.Enums.MachineEnum;
|
||||||
using static LMS.Common.Enums.ResponseCodeEnum;
|
using static LMS.Common.Enums.ResponseCodeEnum;
|
||||||
using static LMS.Repository.DTO.MachineResponse.MachineDto;
|
using static LMS.Repository.DTO.MachineDto;
|
||||||
|
|
||||||
namespace LMS.service.Controllers
|
namespace LMS.service.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
using LMS.Repository.DB;
|
using LMS.Common.Extensions;
|
||||||
|
using LMS.Repository.DB;
|
||||||
using LMS.Repository.DTO;
|
using LMS.Repository.DTO;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Options;
|
using LMS.Repository.Options;
|
||||||
using LMS.service.Service;
|
using LMS.service.Service;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using static LMS.Common.Enums.ResponseCodeEnum;
|
using static LMS.Common.Enums.ResponseCodeEnum;
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
using LMS.Repository.Models.Promission;
|
using LMS.Common.Extensions;
|
||||||
using LMS.Repository.RequestModel.Permission;
|
using LMS.Repository.Promission;
|
||||||
using LMS.service;
|
using LMS.service;
|
||||||
using LMS.service.Service.PermissionService;
|
using LMS.service.Service.PermissionService;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using static LMS.Common.Enums.ResponseCodeEnum;
|
using static LMS.Common.Enums.ResponseCodeEnum;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
using LMS.DAO;
|
using LMS.Common.Extensions;
|
||||||
|
using LMS.DAO;
|
||||||
using LMS.Repository.DTO;
|
using LMS.Repository.DTO;
|
||||||
using LMS.Repository.DTO.PromptDto;
|
using LMS.Repository.DTO.PromptDto;
|
||||||
using LMS.Repository.DTO.PromptTypeDto;
|
using LMS.Repository.DTO.PromptTypeDto;
|
||||||
using LMS.Repository.PromptModel;
|
using LMS.Repository.PromptModel;
|
||||||
using LMS.service.Service.PromptService;
|
using LMS.service.Service.PromptService;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using LMS.Repository.DTO;
|
using LMS.Common.Extensions;
|
||||||
|
using LMS.Repository.DTO;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Role;
|
using LMS.Repository.Role;
|
||||||
using LMS.service.Service.RoleService;
|
using LMS.service.Service.RoleService;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using LMS.Repository.DTO;
|
using LMS.Common.Extensions;
|
||||||
|
using LMS.Repository.DTO;
|
||||||
using LMS.Repository.DTO.Software;
|
using LMS.Repository.DTO.Software;
|
||||||
using LMS.Repository.Software;
|
using LMS.Repository.Software;
|
||||||
using LMS.service.Service.SoftwareService;
|
using LMS.service.Service.SoftwareService;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
using LMS.DAO;
|
using LMS.Common.Extensions;
|
||||||
|
using LMS.DAO;
|
||||||
using LMS.Repository.DTO;
|
using LMS.Repository.DTO;
|
||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DTO.UserDto;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Models.User;
|
using LMS.Repository.Models.User;
|
||||||
using LMS.Repository.User;
|
using LMS.Repository.User;
|
||||||
using LMS.service.Service.UserService;
|
using LMS.service.Service.UserService;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using MailKit.Net.Smtp;
|
using MailKit.Net.Smtp;
|
||||||
using MailKit.Security;
|
using MailKit.Security;
|
||||||
|
|||||||
@ -27,6 +27,8 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.3" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.3" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
||||||
|
<PackageReference Include="Quartz" Version="3.14.0" />
|
||||||
|
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
|
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
|
||||||
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.0" />
|
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.0" />
|
||||||
<PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" />
|
<PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" />
|
||||||
|
|||||||
@ -36,6 +36,7 @@ builder.Services.AddLoggerService();
|
|||||||
builder.Host.UseSerilog();
|
builder.Host.UseSerilog();
|
||||||
// 关键步骤:注册 Serilog.ILogger 到 DI 容器
|
// 关键步骤:注册 Serilog.ILogger 到 DI 容器
|
||||||
builder.Services.AddSingleton(Log.Logger);
|
builder.Services.AddSingleton(Log.Logger);
|
||||||
|
builder.Services.AddQuartzTaskSchedulerService();
|
||||||
|
|
||||||
builder.Services.AddDbContext<ApplicationDbContext>(options =>
|
builder.Services.AddDbContext<ApplicationDbContext>(options =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,10 +8,10 @@ using static LMS.Common.Enums.ResponseCodeEnum;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using LMS.Repository.Model;
|
using LMS.Repository.Model;
|
||||||
using LMS.Tools;
|
|
||||||
using Betalgo.Ranul.OpenAI.Managers;
|
using Betalgo.Ranul.OpenAI.Managers;
|
||||||
using Betalgo.Ranul.OpenAI;
|
using Betalgo.Ranul.OpenAI;
|
||||||
using Betalgo.Ranul.OpenAI.ObjectModels.RequestModels;
|
using Betalgo.Ranul.OpenAI.ObjectModels.RequestModels;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
|
|
||||||
namespace LMS.service.Service;
|
namespace LMS.service.Service;
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.Repository.DB;
|
using LMS.Repository.DB;
|
||||||
using LMS.Repository.DTO;
|
using LMS.Repository.DTO;
|
||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DTO.UserDto;
|
||||||
|
using LMS.Repository.Machine;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Models.Machine;
|
|
||||||
using LMS.Tools;
|
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@ -14,8 +13,8 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using static LMS.Common.Enums.MachineEnum;
|
using static LMS.Common.Enums.MachineEnum;
|
||||||
using static LMS.Common.Enums.ResponseCodeEnum;
|
using static LMS.Common.Enums.ResponseCodeEnum;
|
||||||
using static LMS.Repository.DTO.MachineResponse.MachineDto;
|
using static LMS.Repository.DTO.MachineDto;
|
||||||
using Machine = LMS.Repository.Models.DB.Machine;
|
using Machine = LMS.Repository.DB.Machine;
|
||||||
|
|
||||||
namespace LMS.service.Service
|
namespace LMS.service.Service
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,16 +1,14 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using LMS.Common.Enums;
|
using LMS.Common.Enums;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.DAO.MachineDAO;
|
using LMS.DAO.MachineDAO;
|
||||||
using LMS.DAO.PermissionDAO;
|
using LMS.DAO.PermissionDAO;
|
||||||
using LMS.DAO.RoleDAO;
|
using LMS.DAO.RoleDAO;
|
||||||
using LMS.DAO.UserDAO;
|
using LMS.DAO.UserDAO;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Models.Promission;
|
using LMS.Repository.Promission;
|
||||||
using LMS.Repository.RequestModel.Permission;
|
|
||||||
using LMS.service.Data;
|
using LMS.service.Data;
|
||||||
using LMS.Tools;
|
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.DAO.UserDAO;
|
using LMS.DAO.UserDAO;
|
||||||
using LMS.Repository.DB;
|
using LMS.Repository.DB;
|
||||||
@ -8,7 +9,6 @@ using LMS.Repository.DTO.PromptTypeDto;
|
|||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DTO.UserDto;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.PromptModel;
|
using LMS.Repository.PromptModel;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.DAO.UserDAO;
|
using LMS.DAO.UserDAO;
|
||||||
using LMS.Repository.DTO;
|
using LMS.Repository.DTO;
|
||||||
@ -6,7 +7,6 @@ using LMS.Repository.DTO.PromptTypeDto;
|
|||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DTO.UserDto;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.PromptModel;
|
using LMS.Repository.PromptModel;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.Repository.DTO;
|
using LMS.Repository.DTO;
|
||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DTO.UserDto;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Role;
|
using LMS.Repository.Role;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.DAO.UserDAO;
|
using LMS.DAO.UserDAO;
|
||||||
using LMS.Repository.DB;
|
using LMS.Repository.DB;
|
||||||
@ -9,7 +10,6 @@ using LMS.Repository.DTO.UserDto;
|
|||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Software;
|
using LMS.Repository.Software;
|
||||||
using LMS.Tools;
|
using LMS.Tools;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.DAO.UserDAO;
|
using LMS.DAO.UserDAO;
|
||||||
using LMS.Repository.DB;
|
using LMS.Repository.DB;
|
||||||
@ -7,7 +8,6 @@ using LMS.Repository.DTO.Software;
|
|||||||
using LMS.Repository.DTO.UserDto;
|
using LMS.Repository.DTO.UserDto;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Software;
|
using LMS.Repository.Software;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using static LMS.Common.Enums.ResponseCodeEnum;
|
using static LMS.Common.Enums.ResponseCodeEnum;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
using LMS.Common.Enums;
|
||||||
using LMS.Common.Enum;
|
using LMS.Common.Extensions;
|
||||||
using LMS.Common.Password;
|
using LMS.Common.Password;
|
||||||
using LMS.Common.RSAKey;
|
using LMS.Common.RSAKey;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
@ -8,7 +8,6 @@ using LMS.Repository.DB;
|
|||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Models.User;
|
using LMS.Repository.Models.User;
|
||||||
using LMS.Repository.User;
|
using LMS.Repository.User;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
using LMS.Common.RSAKey;
|
using LMS.Common.Extensions;
|
||||||
|
using LMS.Common.RSAKey;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.Repository.DB;
|
using LMS.Repository.DB;
|
||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.User;
|
using LMS.Repository.User;
|
||||||
using LMS.service.Data;
|
using LMS.service.Data;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using LMS.Common.Enum;
|
using LMS.Common.Enums;
|
||||||
|
using LMS.Common.Extensions;
|
||||||
using LMS.Common.RSAKey;
|
using LMS.Common.RSAKey;
|
||||||
using LMS.DAO;
|
using LMS.DAO;
|
||||||
using LMS.DAO.UserDAO;
|
using LMS.DAO.UserDAO;
|
||||||
@ -8,7 +9,6 @@ using LMS.Repository.DTO.UserDto;
|
|||||||
using LMS.Repository.Models.DB;
|
using LMS.Repository.Models.DB;
|
||||||
using LMS.Repository.Models.User;
|
using LMS.Repository.Models.User;
|
||||||
using LMS.Repository.User;
|
using LMS.Repository.User;
|
||||||
using LMS.Tools.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|||||||
@ -26,6 +26,6 @@
|
|||||||
],
|
],
|
||||||
"Enrich": [ "FromLogContext" ]
|
"Enrich": [ "FromLogContext" ]
|
||||||
},
|
},
|
||||||
"Version": "1.0.5",
|
"Version": "1.0.6",
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user