动态sql if标签怎么判空

img


我对flowstatus进行是否为空判断,为什么等于空那个if标签不生效,是写法不对吗

and换成 or

img

1、flowstatus参数类型如果是集合或者数组,需要判断flowstatus != null and flowstatus.legth > 0,并且需要使用《for》标签
2、flowstatus参数类型是字符串则无问题
建议where 1=1 换成《where》标签处理,请参考。