From 667ed6f3c7eecbc881a84d4ed253828d615da284 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期六, 12 十月 2024 11:56:21 +0800 Subject: [PATCH] 单点登录 --- /dev/null | 0 WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs | 7 ++++++- WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj | 2 +- WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/df097475-a21c-477f-bae8-fdcb85add7c1.vsidx | 0 WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7dc1175d-35b9-490c-9810-66c8a03b0b35.vsidx | 0 WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/807c1085-b5db-45c9-85fe-e0abeda74d6d.vsidx | 0 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1eef2127-b3b2-4d91-a9e1-7ea35c8f1c22.vsidx b/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1eef2127-b3b2-4d91-a9e1-7ea35c8f1c22.vsidx deleted file mode 100644 index 86e44f7..0000000 --- a/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1eef2127-b3b2-4d91-a9e1-7ea35c8f1c22.vsidx +++ /dev/null Binary files differ diff --git a/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7dc1175d-35b9-490c-9810-66c8a03b0b35.vsidx b/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7dc1175d-35b9-490c-9810-66c8a03b0b35.vsidx new file mode 100644 index 0000000..041f50f --- /dev/null +++ b/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7dc1175d-35b9-490c-9810-66c8a03b0b35.vsidx Binary files differ diff --git a/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/807c1085-b5db-45c9-85fe-e0abeda74d6d.vsidx b/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/807c1085-b5db-45c9-85fe-e0abeda74d6d.vsidx new file mode 100644 index 0000000..a522e69 --- /dev/null +++ b/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/807c1085-b5db-45c9-85fe-e0abeda74d6d.vsidx Binary files differ diff --git a/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/df097475-a21c-477f-bae8-fdcb85add7c1.vsidx b/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/df097475-a21c-477f-bae8-fdcb85add7c1.vsidx new file mode 100644 index 0000000..70aef67 --- /dev/null +++ b/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/df097475-a21c-477f-bae8-fdcb85add7c1.vsidx Binary files differ diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj b/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj index 20aafa6..a77ecc6 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj +++ b/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj @@ -8,7 +8,7 @@ <ItemGroup> <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> - <PackageReference Include="WIDESEAWCS_Core" Version="1.0.0" /> + <PackageReference Include="WIDESEAWCS_Core" Version="1.0.4" /> </ItemGroup> <ItemGroup> diff --git a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs index 85d5afa..874ff8f 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs @@ -10,15 +10,18 @@ using WIDESEAWCS_ISystemRepository; using WIDESEAWCS_Core.BaseRepository; using System.Net; +using WIDESEAWCS_Core.Caches; namespace WIDESEAWCS_SystemServices { public class Sys_UserService : ServiceBase<Sys_User, ISys_UserRepository>, ISys_UserService { private readonly IUnitOfWorkManage _unitOfWorkManage; - public Sys_UserService(ISys_UserRepository repository, IUnitOfWorkManage unitOfWorkManage) : base(repository) + private readonly ICacheService _cacheService; + public Sys_UserService(ISys_UserRepository repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService) : base(repository) { _unitOfWorkManage = unitOfWorkManage; + _cacheService = cacheService; } public WebResponseContent Login(LoginInfo loginInfo) @@ -52,6 +55,8 @@ TenantId = user.TenantId, }); + _cacheService.AddOrUpdate(user.UserId.ToString(), token); + content = WebResponseContent.Instance.OK(data: new { token, userName = user.UserTrueName, img = user.HeadImageUrl }); } else -- Gitblit v1.9.3