|
|
|
@ -31,6 +31,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using NPOI.SS.Formula.Functions; |
|
|
|
using NPOI.SS.Formula.Functions; |
|
|
|
|
|
|
|
using NPOI.Util; |
|
|
|
using StackExchange.Profiling; |
|
|
|
using StackExchange.Profiling; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Security.Claims; |
|
|
|
using System.Security.Claims; |
|
|
|
@ -399,6 +400,7 @@ namespace ATS.NonCustodial.Application.Impl.Admins |
|
|
|
if (user == null) return string.Empty; |
|
|
|
if (user == null) return string.Empty; |
|
|
|
|
|
|
|
|
|
|
|
var roles = (await _userService.IsAdmin(user.Id)).Roles.Select(w => w.Id).ToList(); |
|
|
|
var roles = (await _userService.IsAdmin(user.Id)).Roles.Select(w => w.Id).ToList(); |
|
|
|
|
|
|
|
string limits = _appUnitRepository.AsQueryable(false, true).Where(a => a.Id == user.UnitId).Select(a => a.limits).FirstOrDefault(); |
|
|
|
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); |
|
|
|
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); |
|
|
|
var timeLogin = Convert.ToInt64(ts.TotalMilliseconds).ToString(); |
|
|
|
var timeLogin = Convert.ToInt64(ts.TotalMilliseconds).ToString(); |
|
|
|
var token = LazyGetRequiredService<IUserToken>().Create(new[] |
|
|
|
var token = LazyGetRequiredService<IUserToken>().Create(new[] |
|
|
|
@ -413,7 +415,7 @@ namespace ATS.NonCustodial.Application.Impl.Admins |
|
|
|
new Claim(ClaimAttributes.orgs,JsonConvert.SerializeObject(Array.Empty<long>())) , |
|
|
|
new Claim(ClaimAttributes.orgs,JsonConvert.SerializeObject(Array.Empty<long>())) , |
|
|
|
new Claim(ClaimAttributes.phone,user?.Phone??""), |
|
|
|
new Claim(ClaimAttributes.phone,user?.Phone??""), |
|
|
|
new Claim(ClaimAttributes.logtime,timeLogin), |
|
|
|
new Claim(ClaimAttributes.logtime,timeLogin), |
|
|
|
new Claim(ClaimAttributes.limits,user?.limits??""), |
|
|
|
new Claim(ClaimAttributes.limits,limits), |
|
|
|
new Claim(ClaimAttributes.personType,user?.ChatPersonType.ToString()!) |
|
|
|
new Claim(ClaimAttributes.personType,user?.ChatPersonType.ToString()!) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|