1
0
mirror of https://gitee.com/coder-xiaomo/flashsale synced 2025-01-10 11:48:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

商品模型4-添加 keyProperty="id" useGeneratedKeys="true"

This commit is contained in:
程序员小墨 2022-03-03 13:20:13 +08:00
parent add4aa6996
commit 65a5688804
5 changed files with 20 additions and 20 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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>