动态sql的if判断

如果是判空直接就是

<if test="ruleType != null and ruleType != ''">

如果是判断等值就是
<if test='orgType == "D" or orgType == "M" or orgType =="Y" or orgType == "N"'>  
需要注意,此处的引号,外面是单引号,里面判断的值是双引号,否则会报错
posted @ 2022-08-03 17:17  蓝海的bug本  阅读(275)  评论(0编辑  收藏  举报