- <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.model.OperationBookList" >
- insert into operation_book_list (id, name, introduce,
- category, state, up_date,
- stop_date, down_date, modify_date
- )
- values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR},
- #{category,jdbcType=VARCHAR}, #{state,jdbcType=CHAR}, #{upDate,jdbcType=TIMESTAMP},
- #{stopDate,jdbcType=TIMESTAMP}, #{downDate,jdbcType=TIMESTAMP}, #{modifyDate,jdbcType=TIMESTAMP}
- )
- </insert>
在insert属性里增加useGeneratedKeys="true" keyProperty="id"