mybatis if判断

mybatis <if test=" "></if> 判断语句关键字智能用小写,不识别大写

<when test="(unit_number != null and unit_number != '') OR (business_code != null and business_code != '') ">

Caused by: org.apache.ibatis.ognl.ParseException: Encountered " "OR “” at line 1
 
正确写法:
<when test="(unit_number != null and unit_number != '') or  (business_code != null and business_code != '') ">
 
 

【<if test="takeWay == '0'">】mybatis的if判断

单个的字符要写到双引号里面才行,改为<if test='takeWay == "1"'>或者改为<if test="takeWay == '1'.toString() ">

posted @ 2021-10-19 11:27  诗与苟且  阅读(306)  评论(0)    收藏  举报