<if test="orderParam == null OR orderParam ==1 ">
ORDER BY id DESC
</if>
<if test="orderParam !=null AND orderParam !='' AND orderParam =='2' ">
ORDER BY age DESC
</if>
Cause: org.apache.ibatis.ognl.ExpressionSyntaxException
平时没注意,偶然间发现mybatis的ognl表达式异常
看了日志才发现这里没有大写的or和and,也可以写 “||”和“&&”
谨记