fix: 修复currenuser为空问题
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Yi.Framework.Core.CurrentUsers
|
||||
|
||||
public long FindUserId()
|
||||
{
|
||||
var userIdOrNull = _principalAccessor.Principal.Claims?.FirstOrDefault(c => c.Type == TokenTypeConst.Id);
|
||||
var userIdOrNull = _principalAccessor.Principal?.Claims?.FirstOrDefault(c => c.Type == TokenTypeConst.Id);
|
||||
if (userIdOrNull == null || string.IsNullOrWhiteSpace(userIdOrNull.Value))
|
||||
{
|
||||
return 0;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务抽象
|
||||
/// </summary>
|
||||
public interface IUserService : ICrudAppService<UserGetOutputDto, UserGetListOutputDto, long, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using Yi.RBAC.Application.Contracts.Identity;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
using Yi.RBAC.Domain.Identity.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
|
||||
namespace Yi.RBAC.Application.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class UserService : CrudAppService<UserEntity, UserGetOutputDto, UserGetListOutputDto, long, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>,
|
||||
IUserService, IAutoApiService
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user