1
huanghongfeng
2024-12-08 885bd60ed54a0642c48c57a3d685cba24e4c763b
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs
@@ -149,23 +149,16 @@
        public WebResponseContent ModifyPwd(string oldPwd, string newPwd)
        {
            WebResponseContent content = WebResponseContent.Instance;
            oldPwd = oldPwd?.Trim();
            newPwd = newPwd?.Trim();
            string message = "";
            try
            {
                if (string.IsNullOrEmpty(oldPwd)) return WebResponseContent.Instance.Error("旧密码不能为空");
                if (string.IsNullOrEmpty(newPwd)) return WebResponseContent.Instance.Error("新密码不能为空");
                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 _oldPwd = oldPwd.EncryptDES(AppSecret.User);
                if (_oldPwd != userCurrentPwd) return WebResponseContent.Instance.Error("旧密码不正确");
                int userId =int.Parse(oldPwd);
                string _newPwd = newPwd.EncryptDES(AppSecret.User);
                if (userCurrentPwd == _newPwd) return WebResponseContent.Instance.Error("新密码不能与旧密码相同");
                BaseDal.UpdateData(new Sys_User