mybatis中判断两个集合是否为空

[quote]在工作中遇到mybatis中判断两个集合是否为空,不为空的话遍历;都为空执行 1=0 or 1=0,则查询出来空集合

select login,name,email from users u where


email in
#{email, jdbcType=VARCHAR}



1 = 0



[color=red][b][/b][/color]
or name in
#{name, jdbcType=VARCHAR}



or 1 = 0


ORDER by name, email ASC
[/quote]

[url]https://blog.csdn.net/cloudzpc/article/details/78254479[/url]

你可能感兴趣的:(Mybatis)