动态sql语句
**1、if元素,如下:
执行查询语句 select * from role where rolename like '%(模糊查询名)%'
where 1=1 and 相当于 where
**2、if语句判断 + where 元素,如下:
执行查询语句 select * from role where rolename like '%(模糊查询名)%'
这里面的where标签 (相当于在where语句加个where 同时也会去掉下面的and条件)
*3、choose+where+when+otherwise,如下:
满足choose条件的话执行查询语句 select * from role where rolename like '%(模糊查询名)%'
否则的话执行 select * from role where role >3
*4、trim
执行查询语句 select * from role where rolename like '%(模糊查询名)%'
5.foreach
select * from role where roleid in (roleid的值1,roleid值2,…)