protected override Expression VisitMember(MemberExpression node)
        {
            if (node.Expression is ParameterExpression)
            {
                //到达根节点,并且一定是左枝
                if (ExpressionUtil.IsEntityMember(node.Member))
                {
                    //x.User.Book.Id
                    string tableName = ExpressionUtil.GetEntityTableName(ExpressionUtil.GetMemberType(node.Member));
                    if (string.IsNullOrWhiteSpace(tableName))
                    {
                        throw new Exception("解析出错");
                    }
                    string alia = _aliaTableNameMap[tableName];
                    field = _memberStack.Pop().Name;
                    _conditionStack.Push("[" + alia + "].[" + field + "]");
                    _conditionStack.Push("@" + field);
                }
                else
                {
                    //按照属性处理
                    field = node.Member.Name;
                    if (_memberStack.Count > 0)
                    {
                        //有属性要转换为sql语句
                        var propertyInfo = (PropertyInfo)_memberStack.Pop();
                        if (propertyInfo.PropertyType.FullName == "System.DateTime" && propertyInfo.PropertyType.Assembly.GlobalAssemblyCache)
                        {
                            //该属性为日期时间型,可进行转换
                            _conditionStack.Push("CONVERT(NVARCHAR(20),[" + field + "],101)");
                        }
                        else
                        {
                            throw new NotImplementedException("不允许使用当前属性取值:" + propertyInfo.PropertyType.Name + "," + propertyInfo.Name);
                        }
                    }
                    else if (_memberStack.Count > 0)
                    {
                        //有方法要转换为sql语句
                        var method = _memberStack.Pop();
                        if (method.Name == "ToDateTime" && method.DeclaringType.Assembly.GlobalAssemblyCache)
                        {
                            _conditionStack.Push("CONVERT(NVARCHAR(20),[" + field + "],101)");
                        }
                        else
                        {
                            throw new NotSupportedException("不支持指定方法的转换:" + method.Name);
                        }
                    }
                    else
                    {
                        _conditionStack.Push("[" + field + "]");
                    }
                    _conditionStack.Push("@" + field);
                }
            }
            else if (node.Expression == null)
            {
                //一定是静态成员,例如:x=>DateTime.Now中的Now,直接取出值
                object value = null;
                if (node.Member.MemberType == MemberTypes.Field)
                {
                    var fieldInfo = node.Member as FieldInfo;
                    value = fieldInfo.GetValue(null);
                }
                else
                {
                    var propertyInfo = node.Member as PropertyInfo;
                    value = propertyInfo.GetValue(null, null);
                }
                while (_memberStack.Count > 0)
                {
                    var member = _memberStack.Pop();
                    if (member.MemberType == MemberTypes.Field)
                    {
                        value = ((FieldInfo)member).GetValue(value);
                    }
                    else if (member.MemberType == MemberTypes.Property)
                    {
                        value = ((PropertyInfo)member).GetValue(value, null);
                    }
                    else
                    {
                        throw new NotSupportedException("未知的成员类型:" + member.MemberType);
                    }
                }
                //if (node.Member.MemberType == MemberTypes.Field)
                //{
                //    var fieldInfo = node.Member as FieldInfo;
                //    _list.Add(fieldInfo.GetValue(null));
                //}
                //else
                //{
                //    var propertyInfo = node.Member as PropertyInfo;
                //    _list.Add(propertyInfo.GetValue(null, null));
                //}
                _list.Add(_conditionStack.Peek(), value);
            }
            else if (node.Expression is ConstantExpression)
            {
                //引用的局部变量
                //var constExp = node.Expression as ConstantExpression;
                //var field = constExp.Value.GetType().GetField(node.Member.Name);
                //var rootValue = field.GetValue(constExp.Value);
                //while (_propertyStack.Count > 0)
                //{
                //    var property = _propertyStack.Pop();
                //    rootValue = property.GetValue(rootValue, null);
                //}
                //_paramStack.Push(rootValue);
                ObjectValueExpressionVisitor visitor = new ObjectValueExpressionVisitor();
                visitor.Visit(node);
                if (visitor.Value is Array || visitor.Value is IEnumerable)
                {
                    var    rootValue = visitor.Value;
                    var    list      = rootValue as IList;
                    object result    = rootValue;
                    while (_memberStack.Count > 0)
                    {
                        var memberInfo = _memberStack.Pop();
                        if (memberInfo.MemberType == MemberTypes.Method)
                        {
                            var method = memberInfo as MethodInfo;
                            IEnumerable <object> args = null;
                            //if (method.Arguments[0] is ConstantExpression)
                            //{
                            //    args = mce.Arguments.Select(x => ((ConstantExpression)x).Value);
                            //    result = mce.Method.Invoke(rootValue, args.ToArray());
                            //}
                            //else
                            //{
                            //    visitor = new ObjectValueExpressionVisitor();
                            //    visitor.Visit(mce.Arguments[0]);
                            //    var extensionArgs = mce.Arguments.Skip(1).Select(x => ((ConstantExpression)x).Value).ToList();
                            //    extensionArgs.Insert(0, visitor.Value);
                            //    result = mce.Method.Invoke(null, extensionArgs.ToArray());
                            //}
                        }
                    }
                    if (_memberStack.Count > 0)
                    {
                        //MethodCallExpression mce = _memberStack.Pop();
                        //IEnumerable<object> args = null;
                        //if (mce.Arguments[0] is ConstantExpression)
                        //{
                        //    args = mce.Arguments.Select(x => ((ConstantExpression)x).Value);
                        //    result = mce.Method.Invoke(rootValue, args.ToArray());
                        //}
                        //else
                        //{
                        //    visitor = new ObjectValueExpressionVisitor();
                        //    visitor.Visit(mce.Arguments[0]);
                        //    var extensionArgs = mce.Arguments.Skip(1).Select(x => ((ConstantExpression)x).Value).ToList();
                        //    extensionArgs.Insert(0, visitor.Value);
                        //    result = mce.Method.Invoke(null, extensionArgs.ToArray());
                        //}
                    }

                    _list.Add(_conditionStack.Peek(), result);
                    //_constStack.Push(rootValue);
                }
                else
                {
                    _constStack.Push(visitor.Value);
                }
                _paramNameStack.Push(node.Member.Name);
            }
            else if (node.Expression is MemberExpression)
            {
                if (!ExpressionReflector.IsEntityPropertyType(ExpressionUtil.GetMemberType(((MemberExpression)node.Expression).Member)))
                {
                    //x=>x.User.Book.Id
                    _memberStack.Push(node.Member);
                }
                else
                {
                    //var a=false;x=>a这种情况
                }
            }
            else
            {
                _memberStack.Push(node.Member);
            }
            return(base.VisitMember(node));
        }
        protected override Expression VisitMember(MemberExpression node)
        {
            if (node.Expression is ParameterExpression)
            {
                //到达根节点,并且一定是左枝
                if (ExpressionUtil.IsEntityMember(node.Member))
                {
                    //x.User.Book.Id
                    string tableName = ExpressionUtil.GetEntityTableName(ExpressionUtil.GetMemberType(node.Member));
                    if (string.IsNullOrWhiteSpace(tableName))
                    {
                        throw new Exception("解析出错");
                    }
                    string alia = _aliaTableNameMap[tableName];
                    field = _memberStack.Pop().Name;
                    _conditionStack.Push("[" + alia + "].[" + field + "]");
                    _conditionStack.Push("@" + field);
                }
                else
                {
                    //按照属性处理
                    field = node.Member.Name;
                    if (_memberStack.Count > 0)
                    {
                        //有属性要转换为sql语句
                        var propertyInfo = (PropertyInfo)_memberStack.Pop();
                        if (propertyInfo.PropertyType.FullName == "System.DateTime" && propertyInfo.PropertyType.Assembly.GlobalAssemblyCache)
                        {
                            //该属性为日期时间型,可进行转换
                            _conditionStack.Push("CONVERT(NVARCHAR(20),[" + field + "],101)");
                        }
                        else
                        {
                            throw new NotImplementedException("不允许使用当前属性取值:" + propertyInfo.PropertyType.Name + "," + propertyInfo.Name);
                        }
                    }
                    else if (_memberStack.Count > 0)
                    {
                        //有方法要转换为sql语句
                        var method = _memberStack.Pop();
                        if (method.Name == "ToDateTime" && method.DeclaringType.Assembly.GlobalAssemblyCache)
                        {
                            _conditionStack.Push("CONVERT(NVARCHAR(20),[" + field + "],101)");
                        }
                        else
                        {
                            throw new NotSupportedException("不支持指定方法的转换:" + method.Name);
                        }
                    }
                    else
                    {
                        _conditionStack.Push("[" + field + "]");
                    }
                    _conditionStack.Push("@" + field);
                }
            }
            else if (node.Expression == null)
            {
                //一定是静态成员,例如:x=>DateTime.Now中的Now,直接取出值
                object value = null;
                if (node.Member.MemberType == MemberTypes.Field)
                {
                    var fieldInfo = node.Member as FieldInfo;
                    value = fieldInfo.GetValue(null);
                }
                else
                {
                    var propertyInfo = node.Member as PropertyInfo;
                    value = propertyInfo.GetValue(null, null);
                }
                while (_memberStack.Count > 0)
                {
                    var member = _memberStack.Pop();
                    if (member.MemberType == MemberTypes.Field)
                    {
                        value = ((FieldInfo)member).GetValue(value);
                    }
                    else if (member.MemberType == MemberTypes.Property)
                    {
                        value = ((PropertyInfo)member).GetValue(value, null);
                    }
                    else
                    {
                        throw new NotSupportedException("未知的成员类型:" + member.MemberType);
                    }
                }
                //if (node.Member.MemberType == MemberTypes.Field)
                //{
                //    var fieldInfo = node.Member as FieldInfo;
                //    _list.Add(fieldInfo.GetValue(null));
                //}
                //else
                //{
                //    var propertyInfo = node.Member as PropertyInfo;
                //    _list.Add(propertyInfo.GetValue(null, null));
                //}
                _list.Add(_conditionStack.Peek(), value);
            }
            else if (node.Expression is ConstantExpression)
            {
                //引用的局部变量
                //var constExp = node.Expression as ConstantExpression;
                //var field = constExp.Value.GetType().GetField(node.Member.Name);
                //var rootValue = field.GetValue(constExp.Value);
                //while (_propertyStack.Count > 0)
                //{
                //    var property = _propertyStack.Pop();
                //    rootValue = property.GetValue(rootValue, null);
                //}
                //_paramStack.Push(rootValue);
                ObjectValueExpressionVisitor visitor = new ObjectValueExpressionVisitor();
                visitor.Visit(node);
                if (visitor.Value is Array || visitor.Value is IEnumerable)
                {
                    var rootValue = visitor.Value;
                    var list = rootValue as IList;
                    object result = rootValue;
                    while (_memberStack.Count > 0)
                    {
                        var memberInfo = _memberStack.Pop();
                        if (memberInfo.MemberType == MemberTypes.Method)
                        {
                            var method = memberInfo as MethodInfo;
                            IEnumerable<object> args = null;
                            //if (method.Arguments[0] is ConstantExpression)
                            //{
                            //    args = mce.Arguments.Select(x => ((ConstantExpression)x).Value);
                            //    result = mce.Method.Invoke(rootValue, args.ToArray());
                            //}
                            //else
                            //{
                            //    visitor = new ObjectValueExpressionVisitor();
                            //    visitor.Visit(mce.Arguments[0]);
                            //    var extensionArgs = mce.Arguments.Skip(1).Select(x => ((ConstantExpression)x).Value).ToList();
                            //    extensionArgs.Insert(0, visitor.Value);
                            //    result = mce.Method.Invoke(null, extensionArgs.ToArray());
                            //}
                        }
                    }
                    if (_memberStack.Count > 0)
                    {
                        //MethodCallExpression mce = _memberStack.Pop();
                        //IEnumerable<object> args = null;
                        //if (mce.Arguments[0] is ConstantExpression)
                        //{
                        //    args = mce.Arguments.Select(x => ((ConstantExpression)x).Value);
                        //    result = mce.Method.Invoke(rootValue, args.ToArray());
                        //}
                        //else
                        //{
                        //    visitor = new ObjectValueExpressionVisitor();
                        //    visitor.Visit(mce.Arguments[0]);
                        //    var extensionArgs = mce.Arguments.Skip(1).Select(x => ((ConstantExpression)x).Value).ToList();
                        //    extensionArgs.Insert(0, visitor.Value);
                        //    result = mce.Method.Invoke(null, extensionArgs.ToArray());
                        //}
                    }

                    _list.Add(_conditionStack.Peek(), result);
                    //_constStack.Push(rootValue);
                }
                else
                {
                    _constStack.Push(visitor.Value);
                }
                _paramNameStack.Push(node.Member.Name);
            }
            else if (node.Expression is MemberExpression)
            {
                if (!ExpressionReflector.IsEntityPropertyType(ExpressionUtil.GetMemberType(((MemberExpression)node.Expression).Member)))
                {
                    //x=>x.User.Book.Id
                    _memberStack.Push(node.Member);
                }
                else
                {
                    //var a=false;x=>a这种情况
                }
            }
            else
            {
                _memberStack.Push(node.Member);
            }
            return base.VisitMember(node);
        }