hibernate中时间比较的小笔记
// 开单时间 if (!"".equals(startDate) && startDate != null) { queryCondition = queryCondition + " and t.receiptDate >= str_to_date('" + startDate + "','%Y-%m-%d')" ; } if (!"".equals(endDate) && endDate != null) { queryCondition = queryCondition // + " and t.orderDate < '"+ CommonUtil.getAddDate(endDate.toString(), 1) +"','%Y-%m-%d')"; + " and t.receiptDate < str_to_date('"+ CommonUtil.getAddDate(endDate.toString(), 1) + "','%Y-%m-%d')"; }
自信与努力 用心坚持