ibatis 数据库时间 插入数据
简介:
SELECT SEQ_TO_DO_BAR.NEXTVAL AS ID FROM DUAL
insert into TO_DO_BAR ()
values (#id:DECIMAL#,...
<insert id="insert" parameterClass="ToDoBar" >
<selectKey resultClass="java.lang.Long" keyProperty="id" type="pre" >
SELECT SEQ_TO_DO_BAR.NEXTVAL AS ID FROM DUAL
</selectKey>
insert into TO_DO_BAR (<include refid="baseColumns" />)
values (#id:DECIMAL#, #todoType:VARCHAR#, #todoReceiver:VARCHAR#, #todoStatus:VARCHAR#, #todoUrl:VARCHAR#, #subSystem:VARCHAR#, sysdate, sysdate, #relatedId:DECIMAL#, #isRemind:VARCHAR#)
</insert>
使用sysdate就可以了,是不是很方便