<insert id="insertMerchant"  parameterType="Merchant" useGeneratedKeys="true" keyProperty="id">

 



  1. <insert id="insertAndGetId" useGeneratedKeys="true" keyProperty="userId" parameterType="com.xf.mybatis.User"> 
  2.     insert into user(userName,password,comment)  
  3.     values(#{userName},#{password},#{comment})  
  4. </insert>