例子一
查询条件dto
public class queryCondition
{
private String[] stuIds; private String name;
}
查询sqlMap
select id,name from student
#stuIds[]#
name like '%$name$%'
在查询条件中有一个数组stuIds,在动态标签中进行遍历,看每一个student的id是否在该数组中。
发出的语句 select id,name from student where id in ( ? , ?) ...
例子二
查询条件dto
public class queryCondition
{
private List lst; private String name;
}
查询sqlMap
select id,name from student
id = #lst[].id#
name like '%$name$%'
发出的语句 select id,name from student where (id = ? or id = ?)...