1. 程式人生 > >mybatis基礎之 datetime欄位的使用

mybatis基礎之 datetime欄位的使用

  • 開發環境: mybatis版本: 3.2.5
    java中有定義為Date型別的欄位checkTime
    對應了資料庫中datetime型別的欄位check_time
    那麼在mybatis的的resultMap的寫法如下
    <result column="check_time" property="checkTime" jdbcType="TIMESTAMP" />
    在欄位使用的寫法如下
    check_time>=#{checkTimeBegin,jdbcType=TIMESTAMP}