1
dengjunjie
8 天以前 72390e0230b64cd43fedf0ba8e17aba097568a4a
代码管理/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)