mybatis時間段查詢(sql)

  <sql id="selectWhere" >
       <where>
          1=1
                  <if test="beginDate !=  null  and beginDate != ''">
                         and       action_terminal.begin_Date&gt;=STR_TO_DATE(#{beginDate},'%Y-%m-%d %H:%i:%s')
                  </if>
                       <if test="endDate !=  null  and  endDate != ''">
                         and     action_terminal.end_Date &lt;= STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')  
                  </if>
                    <if test="terminalName !=  null  and  terminalName != ''">
                         like      action_terminal.terminal_name=#{terminalName,jdbcType=TIMESTAMP} 

                  </if>
       </where>
  </sql>

easyui datagrid 得到後臺的時間數據是 jun 1,2016… 類似這樣的時間

解決辦法如下
前提要求是。實體BEEN 裏面的時間類型是String
date_format(creation_date,'%Y-%m-%d %T') as creation_date,

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