首页 > 代码库 > mybatis insert前获取要插入的值

mybatis insert前获取要插入的值

    <insert id="insertRequestItem" parameterType="requestItemModel">            <selectKey keyProperty="itemId" resultType="String" order="BEFORE">            select max(0 + item_id) + 1 from DUING.M_REQUEST_ITEM where kind_id = #{kindId}        </selectKey>            INSERT INTO M_REQUEST_ITEM (            item_id,            create_datetime,            update_datetime            )        VALUES (            #{itemId},            now(),            now()            )    </insert>

 

mybatis insert前获取要插入的值