UserManager新增分部类,定义访问令牌,用于定时任务解析当前登录用户信息
This commit is contained in:
@@ -4,18 +4,24 @@ using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Net.Http;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using Aop.Api.Domain;
|
||||
using JNPF;
|
||||
using JNPF.Common.Const;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DataEncryption;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.LinqBuilder;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
@@ -61,6 +67,9 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpPost]
|
||||
public async Task KittingOutByAdd(CancellationTokenSource? cts = default)
|
||||
{
|
||||
if (UserManager.AsscessToken.IsNullOrWhiteSpace()) return;
|
||||
var curUser = await GetUserIdentity();
|
||||
|
||||
var curDb = _db.CopyNew();
|
||||
try
|
||||
{
|
||||
@@ -114,8 +123,8 @@ namespace Tnb.WarehouseMgr
|
||||
setSortingH.id = SnowflakeIdHelper.NextId();
|
||||
setSortingH.kittingout_id = ko.id;
|
||||
setSortingH.seq = ko.seq;
|
||||
setSortingH.org_id = _userManager.User.OrganizeId;
|
||||
setSortingH.create_id = _userManager.UserId;
|
||||
setSortingH.org_id = curUser.FindFirst(ClaimConst.CLAINMORGID)?.Value;
|
||||
setSortingH.create_id = curUser.FindFirst(ClaimConst.CLAINMUSERID)?.Value;
|
||||
setSortingH.create_time = DateTime.Now;
|
||||
await curDb.Insertable(setSortingH).ExecuteCommandAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user