xml里的
<select id="selectDate" resultClass="Daycount">
select * from daycount where theday between #theday1# and #theday2#
</select>dao里的public List<Daycount> findDate(Date d1, Date d2) {
// TODO Auto-generated method stub
List<Daycount> list = null;
try {
list = (List<Daycount>) client.queryForObject("selectDate", d1, d2);
} catch (SQLException e) {
e.printStackTrace();
}
return list;
}
<select id="selectDate" resultClass="Daycount">
select * from daycount where theday between #theday1# and #theday2#
</select>dao里的public List<Daycount> findDate(Date d1, Date d2) {
// TODO Auto-generated method stub
List<Daycount> list = null;
try {
list = (List<Daycount>) client.queryForObject("selectDate", d1, d2);
} catch (SQLException e) {
e.printStackTrace();
}
return list;
}
dao实现也要把参数放到Map传递
额小弟初学,不太懂,xml里面 没指定参数类型 是什么意思?啊
<select id="selectDate" parameterType="java.util.Map" resultClass="Daycount">