mirror of
				https://gitee.com/coder-xiaomo/flashsale
				synced 2025-11-04 06:03:13 +08:00 
			
		
		
		
	商品模型4-添加 keyProperty="id" useGeneratedKeys="true"
This commit is contained in:
		@@ -42,7 +42,7 @@
 | 
			
		||||
    delete from item_info
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </delete>
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO">
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO" useGeneratedKeys="true" keyProperty="id">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
@@ -55,7 +55,7 @@
 | 
			
		||||
      #{description,jdbcType=VARCHAR}, #{sales,jdbcType=INTEGER}, #{imgUrl,jdbcType=VARCHAR}
 | 
			
		||||
      )
 | 
			
		||||
  </insert>
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO">
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO" useGeneratedKeys="true" keyProperty="id">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@
 | 
			
		||||
    delete from item_stock
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </delete>
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO">
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO" useGeneratedKeys="true" keyProperty="id">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
@@ -50,7 +50,7 @@
 | 
			
		||||
    values (#{id,jdbcType=INTEGER}, #{stock,jdbcType=INTEGER}, #{itemId,jdbcType=INTEGER}
 | 
			
		||||
      )
 | 
			
		||||
  </insert>
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO">
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO" useGeneratedKeys="true" keyProperty="id">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
 
 | 
			
		||||
@@ -43,7 +43,7 @@
 | 
			
		||||
    delete from user_info
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </delete>
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.UserDO">
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.UserDO" keyProperty="id" useGeneratedKeys="true">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
@@ -56,7 +56,7 @@
 | 
			
		||||
      #{age,jdbcType=INTEGER}, #{telephone,jdbcType=VARCHAR}, #{registerMode,jdbcType=VARCHAR}, 
 | 
			
		||||
      #{thirdPartyId,jdbcType=VARCHAR})
 | 
			
		||||
  </insert>
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.UserDO">
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.UserDO" keyProperty="id" useGeneratedKeys="true">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@
 | 
			
		||||
    delete from user_password
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </delete>
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.UserPasswordDO">
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.UserPasswordDO" keyProperty="id" useGeneratedKeys="true">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
@@ -50,7 +50,7 @@
 | 
			
		||||
    values (#{id,jdbcType=INTEGER}, #{encryptPassword,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}
 | 
			
		||||
      )
 | 
			
		||||
  </insert>
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.UserPasswordDO">
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.UserPasswordDO" keyProperty="id" useGeneratedKeys="true">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
 
 | 
			
		||||
@@ -41,18 +41,18 @@
 | 
			
		||||
        <!--selectByExampleQueryId="false"-->
 | 
			
		||||
 | 
			
		||||
        <!-- 生成对应表及其类名 -->
 | 
			
		||||
        <table tableName="user_info" domainObjectName="UserDO" enableCountByExample="false"
 | 
			
		||||
               enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
 | 
			
		||||
               selectByExampleQueryId="false"></table>
 | 
			
		||||
        <table tableName="user_password" domainObjectName="UserPasswordDO" enableCountByExample="false"
 | 
			
		||||
               enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
 | 
			
		||||
               selectByExampleQueryId="false"></table>
 | 
			
		||||
        <table tableName="item_info" domainObjectName="ItemDO" enableCountByExample="false"
 | 
			
		||||
               enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
 | 
			
		||||
               selectByExampleQueryId="false"></table>
 | 
			
		||||
        <table tableName="item_stock" domainObjectName="ItemStockDO" enableCountByExample="false"
 | 
			
		||||
               enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
 | 
			
		||||
               selectByExampleQueryId="false"></table>
 | 
			
		||||
        <!--<table tableName="user_info" domainObjectName="UserDO" enableCountByExample="false"-->
 | 
			
		||||
        <!--       enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->
 | 
			
		||||
        <!--       selectByExampleQueryId="false"></table>-->
 | 
			
		||||
        <!--<table tableName="user_password" domainObjectName="UserPasswordDO" enableCountByExample="false"-->
 | 
			
		||||
        <!--       enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->
 | 
			
		||||
        <!--       selectByExampleQueryId="false"></table>-->
 | 
			
		||||
        <!--<table tableName="item_info" domainObjectName="ItemDO" enableCountByExample="false"-->
 | 
			
		||||
        <!--       enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->
 | 
			
		||||
        <!--       selectByExampleQueryId="false"></table>-->
 | 
			
		||||
        <!--<table tableName="item_stock" domainObjectName="ItemStockDO" enableCountByExample="false"-->
 | 
			
		||||
        <!--       enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"-->
 | 
			
		||||
        <!--       selectByExampleQueryId="false"></table>-->
 | 
			
		||||
 | 
			
		||||
    </context>
 | 
			
		||||
</generatorConfiguration>
 | 
			
		||||
		Reference in New Issue
	
	Block a user