通过时间差查询数据库
//查询下单后一分钟之后未收到微信通知的记录
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String format = sdf.format(new Date());
int nowTime = Integer.parseInt(format)-60;
String sql ="SELECT * FROM t_order_info WHERE wx_notice_status != 1
AND DATE_FORMAT(create_time,'%Y-%m-%d %H:%M:%s') < DATE_FORMAT(?,'%Y-%m-%d %H:%M:%s')";
return dao.find(sql,new Object[]{nowTime});