From 72390e0230b64cd43fedf0ba8e17aba097568a4a Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 26 六月 2025 16:36:13 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
index fa360fe..5145232 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
@@ -6,6 +6,7 @@
 using WIDESEA_Core;
 using WIDESEA_Core.Authorization;
 using WIDESEA_Core.BaseController;
+using WIDESEA_Core.Caches;
 using WIDESEA_Core.Const;
 using WIDESEA_Core.Helper;
 using WIDESEA_Core.HttpContextUser;
@@ -21,10 +22,12 @@
     public class Sys_UserController : ApiBaseController<ISys_UserService, Sys_User>
     {
         private readonly IHttpContextAccessor _httpContextAccessor;
+        private readonly ICacheService _cacheService;
 
-        public Sys_UserController(ISys_UserService userService, IHttpContextAccessor httpContextAccessor) : base(userService)
+        public Sys_UserController(ISys_UserService userService, IHttpContextAccessor httpContextAccessor, ICacheService cacheService) : base(userService)
         {
             _httpContextAccessor = httpContextAccessor;
+            _cacheService = cacheService;
         }
 
         [HttpPost, Route("login"), AllowAnonymous]
@@ -32,6 +35,7 @@
         {
             return Json(Service.Login(loginInfo));
         }
+
         [HttpPost, Route("getCurrentUserInfo")]
         public WebResponseContent GetCurrentUser()
         {
@@ -39,9 +43,9 @@
         }
 
         [HttpPost, Route("modifyPwd")]
-        public IActionResult ModifyPwd(string oldPwd, string newPwd)
+        public IActionResult ModifyPwd(string oldPwd, string newPwd, int user_Id)
         {
-            return Json(Service.ModifyPwd(oldPwd, newPwd));
+            return Json(Service.ModifyPwd(oldPwd, newPwd, user_Id));
         }
 
         [HttpGet, Route("getVierificationCode"), AllowAnonymous]
@@ -81,6 +85,7 @@
                     UserName = App.User.UserName
                 };
                 string newToken = JwtHelper.IssueJwt(tokenModelJwt);
+                _cacheService.AddOrUpdate(tokenModelJwt.UserId.ToString(), newToken);
                 return responseContent = WebResponseContent.Instance.OK(data: newToken);
             }
             catch (Exception ex)

--
Gitblit v1.9.3