
mabatis
NO如果
加油,进步
展开
-
mabatis中处理mysql中的类型为date的字段,查询条件处理
mybatis默认是 jdbcType=TIMESTAMP 即例如"2019-01-01 00:00:00"而mysql中如果存储的是date 存储的是 如"2019-01-01"所以查询条件应该为:and start_date <![CDATA[ <= ]]> #{currentDate,jdbcType=DATE}and end_date <![CDATA[ &g...原创 2019-04-22 15:48:09 · 1493 阅读 · 0 评论 -
mybatis 返回最大Id
mapper 中配置useGeneratedKeys="true" keyProperty="id"如返回的Id自动赋值给传入的对象如int insertSelective(CpsActivityRewardDo record); 值就赋给了record原创 2019-04-15 12:12:02 · 5411 阅读 · 0 评论