数据权限功能
This commit is contained in:
@@ -64,10 +64,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
[HttpPost]
|
||||
public async Task<Result> Login(LoginDto loginDto)
|
||||
{
|
||||
|
||||
//跳过
|
||||
//跳过,需要redis缓存获取uuid与code的关系,进行比较即可
|
||||
//先效验验证码和UUID
|
||||
|
||||
UserEntity user = new();
|
||||
if (await _iUserService.Login(loginDto.UserName, loginDto.Password, o => user = o))
|
||||
{
|
||||
@@ -181,7 +179,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
var uuid = Guid.NewGuid();
|
||||
var code = _securityCode.GetRandomEnDigitalText(4);
|
||||
//将uuid与code中心化保存起来,登录根据uuid比对即可
|
||||
//将uuid与code,Redis缓存中心化保存起来,登录根据uuid比对即可
|
||||
var imgbyte = _securityCode.GetEnDigitalCodeByte(code);
|
||||
return Result.Success().SetData(new { uuid = uuid, img = imgbyte });
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ using Microsoft.Extensions.Localization;
|
||||
using Yi.Framework.WebCore.AttributeExtend;
|
||||
using Yi.Framework.WebCore.SignalRHub;
|
||||
using Hei.Captcha;
|
||||
using Yi.Framework.WebCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Configuration.AddCommandLine(args);
|
||||
@@ -52,9 +54,10 @@ builder.Host.ConfigureLogging(loggingBuilder =>
|
||||
#endregion
|
||||
builder.Services.AddIocService(builder.Configuration);
|
||||
#region
|
||||
//Sqlsugar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
|
||||
//Sqlsugar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><DEB9>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҪRedis<69><73><EFBFBD><EFBFBD>
|
||||
#endregion
|
||||
builder.Services.AddSqlsugarServer();
|
||||
//builder.Services.AddSqlsugarServer(DbFiterExtend.Data);
|
||||
#region
|
||||
//Quartz<74><7A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#endregion
|
||||
@@ -117,8 +120,14 @@ builder.Services.AddLocalizerService();
|
||||
//<2F><><EFBFBD><EFBFBD>signalR
|
||||
#endregion
|
||||
builder.Services.AddSignalR();
|
||||
|
||||
#region
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>
|
||||
#endregion
|
||||
builder.Services.AddHeiCaptcha();
|
||||
#region
|
||||
//<2F><><EFBFBD><EFBFBD>Http<74><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#endregion
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
var app = builder.Build();
|
||||
#region
|
||||
|
||||
Reference in New Issue
Block a user