摘要: 动态SQL 当需求是可能存在0到多个条件进行sql查询时,需要进行sql条件拼接。使用java过于繁琐,在mybatis有如下的解决方案。 1.使用if标签进行拼接 select * from table where 1=1 <if test=" name != null and name != ' 阅读全文