自增id问题
This commit is contained in:
@@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
c.column_id
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTableColumn" parameterType="GenTableColumn" >
|
||||
<insert id="insertGenTableColumn" parameterType="GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
|
||||
insert into gen_table_column (
|
||||
<if test="columnId != null ">column_id,</if>
|
||||
<if test="tableId != null and tableId != ''">table_id,</if>
|
||||
|
||||
@@ -140,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by c.sort
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTable" parameterType="GenTable" >
|
||||
<insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId" >
|
||||
insert into gen_table (
|
||||
<if test="tableId != null">table_id,</if>
|
||||
<if test="tableName != null">table_name,</if>
|
||||
|
||||
Reference in New Issue
Block a user