日期控件選中同一天無法查詢

if(StringUtils.isNotEmptyOrNull(date) && date.length() > 0){
                String[] time = date.split("~");
                if(time.length == 2){
                    startTime = time[0]+" 00:00:00";
                    endTime = time[1] + " 23:59:59";
                }
                reportapply.setStartdate(startTime);
                reportapply.setEnddate(endTime);
            }
<if test="entity.startdate != null and entity.startdate !='' ">        
            AND  APPLYTIME  <![CDATA[ >= ]]> to_date(#{entity.startdate},'yyyy-MM-dd hh24:mi:ss') 
        </if>
        <if test="entity.enddate!= null and entity.enddate !='' ">        
            AND  APPLYTIME    <![CDATA[ <= ]]> to_date( #{entity.enddate},'yyyy-MM-dd hh24:mi:ss')  
        </if>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章