protected override object ChangePassowrdByCertificate(string certificate, string password)
        {
            if (string.IsNullOrWhiteSpace(password))
            {
                return(ErrorResult("密码不能为空"));
            }

            certificate = SecureHelper.AESDecrypt(certificate, _encryptKey);
            long userId = long.TryParse(certificate.Split(':')[0], out userId) ? userId : 0;

            if (userId == 0)
            {
                throw new HimallException("数据异常");
            }

            ShopBranchApplication.UpdateShopBranchManagerPwd(userId, password);

            return(SuccessResult("密码修改成功"));
        }
        protected override object ChangePasswordByOldPassword(string oldPassword, string password)
        {
            if (string.IsNullOrWhiteSpace(password))
            {
                return(ErrorResult("密码不能为空"));
            }

            CheckUserLogin();

            var user = CurrentUser;

            var pwd = SecureHelper.MD5(SecureHelper.MD5(oldPassword) + user.PasswordSalt);

            if (pwd == user.Password)
            {
                ShopBranchApplication.UpdateShopBranchManagerPwd(user.Id, password);
                return(SuccessResult("密码修改成功"));
            }

            return(ErrorResult("旧密码输入不正确"));
        }