org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'companyCode != null AND companyCode != '''. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: companyCode != null AND companyCode != '' [org.apache.ibatis.ognl.ParseException: Encountered " <IDENT> "AND "" at line 1, column 21. Was expecting one of: <EOF> "," ... "=" ... "?" ... "||" ... "or" ... "&&" ... "and" ... "|" ... "bor" ... "^" ... "xor" ... "&" ... "band" ... "==" ... "eq" ... "!=" ... "neq" ... "<" ... "lt" ... ">" ... "gt" ... "<=" ... "lte" ... ">=" ... "gte" ... "in" ... "not" ... "<<" ... "shl" ... ">>" ... "shr" ... ">>>" ... "ushr" ... "+" ... "-" ... "*" ... "/" ... "%" ... "instanceof" ... "." ... "(" ... "[" ... <DYNAMIC_SUBSCRIPT> ... ] (This error was thrown by business method, please check full stacktrace for cause.)
看错误提示companyCode != null AND companyCode != ''时这里出现了问题,这里只需要将AND改成小写and就行了