leo
2022-05-28 08a1e7ca0971c53f731a9571afaf347f473cf74a
ChangePassword接口bug优化20220528FX
2个文件已修改
10 ■■■■■ 已修改文件
GasolineBlend/Controllers/UserController.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pissa.Service/DbService/UserService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
GasolineBlend/Controllers/UserController.cs
@@ -171,7 +171,7 @@
                if (newpwd.Length < 6)
                    return Error("密码长度不能少于6位");
                var user = _acc.GetAccount(OperatorProvider.Instance.Current.UserId);
                var user = _acc.GetAccountbyId(OperatorProvider.Instance.Current.UserId);
                string passwordmd5old = Encrypt.EncryptionWithSalt(oldpwd, user.UserName, user.Salt);
                if (user.Password != passwordmd5old)
                    return Error("旧密码不正确");
@@ -254,9 +254,10 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [LoginChecked(true)]
        public ActionResult GetUserVipInfo()
        {
            if (OperatorProvider.Instance.Current == null) return Error("登录超时!请重新登录!");
            //if (OperatorProvider.Instance.Current == null) return Error("登录超时!请重新登录!");
            var userId = OperatorProvider.Instance.Current.UserId;
            var res = _repo.GetVipInfo(userId).Result;
@@ -268,9 +269,10 @@
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [LoginChecked(true)]
        public ActionResult GetUserInfo(string userId)
        {
            if (OperatorProvider.Instance.Current == null) return Error("登录超时!请重新登录!");
            //if (OperatorProvider.Instance.Current == null) return Error("登录超时!请重新登录!");
            userId = string.IsNullOrWhiteSpace(userId) ? OperatorProvider.Instance.Current.UserId : userId;
            var res = _repo.GetModelAsync(a => a.Id == userId).Result;
Pissa.Service/DbService/UserService.cs
@@ -26,7 +26,7 @@
                    StartTime = a.StartDate,
                    EndTime = a.EndDate,
                    DownNumPerDay = ac.DayNumber,
                    DownNumPerMonth = ac.MonthNumber
                    DownNumPerMonth = ac.MonthNumber,
                })
                .FirstAsync();
            return res;