1. hql: ...and accopt_time > ?"
2. query.setDate
Query query = session.createQuery(hql);
int i = 0;
//给非日期字段赋值
for (i = 0; i < params.length-1; i++) {
query.setString(i, params[i]);
}
//给开始日期字段赋值
query.setDate(i, DateUtil.string2date(params[i]));
3. 参考
ref: http://blog.sina.com.cn/s/blog_7d8cef530101errt.html
时间: 2024-11-06 03:28:55