查询时间范围卡0点

StringBuffer cdsb = new StringBuffer(crGettime_end);
            cdsb.append(" 23:59:59");
            crGettime_end = cdsb.toString();
            wheresql += " and a.cr_Gettime <='"+crGettime_end+"'";

 

//制单日期开始
            String createDateBegin = request.getParameter("createDate_begin");
            //制单日期结束
            String createDateEnd = request.getParameter("createDate_end");
            if(StringUtils.isNotEmpty(createDateBegin)) {
                sql1=sql1+" and create_date >= '"+createDateBegin+"'" ;
            }
            if(StringUtils.isNotEmpty(createDateEnd)) {
                StringBuffer cdsb = new StringBuffer(createDateEnd);
                cdsb.append(" 23:59:59");
                sql1=sql1+" and create_date <= '"+cdsb.toString()+"'" ;
            }

 

posted @ 2020-03-16 11:23  薛柏梁  阅读(189)  评论(0编辑  收藏  举报