feat: 优化友好提示

This commit is contained in:
陈淳
2024-02-27 17:15:08 +08:00
parent 6697649b97
commit d23492b9a8

View File

@@ -33,7 +33,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.Repositories
var user = await _DbQueryable.Includes(u => u.Roles.Where(r => r.IsDeleted == false).ToList(), r => r.Menus.Where(m => m.IsDeleted == false).ToList()).InSingleAsync(userId);
if (user is null)
{
throw new ArgumentNullException($"数错误用户id{nameof(userId)} 不存在");
throw new UserFriendlyException($"数错误用户id{nameof(userId)} 不存在,请重新登录");
}
user.Password = string.Empty;
user.Salt = string.Empty;