wangxinhui
2025-01-11 3090db54ecfebf7ee1089bf85916b19e93f0db45
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs
@@ -13,6 +13,8 @@
using WIDESEA_Core.Caches;
using SqlSugar;
using ICacheService = WIDESEA_Core.Caches.ICacheService;
using HslCommunication.WebSocket;
using WIDESEA_Core.HostedService;
namespace WIDESEA_SystemService
{
@@ -73,8 +75,10 @@
                    });
                    _cacheService.AddOrUpdate(user.UserId.ToString(), token);
                    if (PermissionDataHostService.UserRoles.FirstOrDefault(x => x.UserId == user.UserId) == null)
                        PermissionDataHostService.UserRoles.AddRange(PermissionDataHostService.GetUserRoles(Db, user.UserId));
                    content = WebResponseContent.Instance.OK(data: new { token, userName = user.UserTrueName, img = user.HeadImageUrl });
                    content = WebResponseContent.Instance.OK(data: new { token, userName = user.UserName, img = user.HeadImageUrl, trueNmae = user.UserTrueName });
                }
                else
                {
@@ -125,7 +129,7 @@
        /// <returns></returns>
        public WebResponseContent GetCurrentUserInfo()
        {
            var data = BaseDal.QueryFirst(x => x.User_Id == App.User.UserId, s => new
            var data = BaseDal.QueryFirst(x => x.UserId == App.User.UserId, s => new
            {
                s.UserName,
                s.UserTrueName,
@@ -159,7 +163,7 @@
                if (newPwd.Length < 6) return WebResponseContent.Instance.Error("密码不能少于6位");
                int userId = App.User.UserId;
                string userCurrentPwd = BaseDal.QueryFirst(x => x.User_Id == userId, s => s.UserPwd);
                string userCurrentPwd = BaseDal.QueryFirst(x => x.UserId == userId, s => s.UserPwd);
                string _oldPwd = oldPwd.EncryptDES(AppSecret.User);
                if (_oldPwd != userCurrentPwd) return WebResponseContent.Instance.Error("旧密码不正确");
@@ -170,7 +174,7 @@
                BaseDal.UpdateData(new Sys_User
                {
                    User_Id = userId,
                    UserId = userId,
                    UserPwd = _newPwd,
                    LastModifyPwdDate = DateTime.Now
                }, new List<string>