mybatis查询部分
<select id="selectBytimes" parameterType="com.weixinjx.model.Times" resultMap="BaseResultMap">
select<include refid="Base_Column_List" />
from qrtable
where
pdate between #{datatime1} and #{datatime2}
</select>
时间段的类:
package com.weixinjx.model;
import java.util.Date;
public class Times {
private Date datatime1;
private Date datatime2;
public Date getDatatime1() {
return datatime1;
}
public void setDatatime1(Date datatime1) {
this.datatime1 = datatime1;
}
public Date getDatatime2() {
return datatime2;
}
public void setDatatime2(Date datatime2) {
this.datatime2 = datatime2;
}
public Times() {
}
public Times(Date datatime1, Date datatime2) {
this.datatime1 = datatime1;
this.datatime2 = datatime2;
}
}