Loading... ### 报错信息 ```log Caused by: org.apache.ibatis.ognl.ParseException: Encountered " <IDENT> "AND "" at line 1, column 19. Was expecting one of: <EOF> "," ... "=" ... "?" ... "||" ... "or" ... "&&" ... "and" ... "|" ... "bor" ... "^" ... "xor" ... "&" ... "band" ... "==" ... "eq" ... "!=" ... "neq" ... "<" ... "lt" ... ">" ... "gt" ... "<=" ... "lte" ... ">=" ... "gte" ... "in" ... "not" ... "<<" ... "shl" ... ">>" ... "shr" ... ">>>" ... "ushr" ... "+" ... "-" ... "*" ... "/" ... "%" ... "instanceof" ... "." ... "(" ... "[" ... <DYNAMIC_SUBSCRIPT> ... ``` ### 报错原因 在mybatis中 ```xml <if test="companyId != null AND companyId != ''"> AND a.company_id=#{companyId} </if> <if test="room != null AND room != ''"> AND t_sys_room.NAME=#{room} </if> <if test="deviceModel != null AND deviceModel != ''"> AND t_sys_dict.label=#{deviceModel} </if> ``` if标签里面的 `and`应该是小写,而不是大写。 最后修改:2023 年 12 月 15 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 1 如果觉得我的文章对你有用,请随意赞赏