单个的字符要写到双引号
里面才行,改为
<if test='takeWay == "1"'>
或者改为
<if test="takeWay == '1'.toString() ">
![](https://i-blog.csdnimg.cn/blog_migrate/1c5b0e3fd80c413d03f619835e10ac53.png)
takeWay == “1”处出错,导致不执行if判断中的sql,运行程序不报错,没有任何提示。去掉takeWay == “1” and 则可执行。对此我百思不得其解,
苦苦纠结了几个小时,最后是我的同事JW大神帮我解决的,膜拜大神o(≧v≦)o~~好棒
把
<if test="takeWay == '1' and workday != null ">
改为
<if test='takeWay == "1" and workday != null '>
或改为
<if test="takeWay == '1'.toString() and workday != null ">
即可。
总结下使用方法:
单个的字符要写到双引号里面或者使用.toString()才行!