以下知识来源说明:http://www.java1234.com/
mapping
<select id="searchStudents6" resultMap="StudentResult">
select * from t_student where name like #{param1} and age=#{param2}
</select>
junit测试
@Test
public void testSearchStudents6() {
logger.info("添加学生(带条件)");
List<Student> studentList=studentMapper.searchStudents6("%3%",12);
for(Student student:studentList){
System.out.println(student);
}
}