fix: 修正id错误

dev
huangfeng 9 months ago
parent 3e90a38499
commit ff6e1696f3

@ -178,28 +178,25 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into mntn_cmd_history (term_id, `name`, cmd,
`desc`, `status`, create_time,
publish_time, `result`, res_time,
content)
values (#{termId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{cmd,jdbcType=VARCHAR},
#{desc,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{publishTime,jdbcType=TIMESTAMP}, #{result,jdbcType=INTEGER}, #{resTime,jdbcType=TIMESTAMP},
#{content,jdbcType=LONGVARCHAR})
insert into mntn_cmd_history (id, term_id, `name`,
cmd, `desc`, `status`,
create_time, publish_time, `result`,
res_time, content)
values (#{id,jdbcType=BIGINT}, #{termId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{cmd,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{publishTime,jdbcType=TIMESTAMP}, #{result,jdbcType=INTEGER},
#{resTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.MntnCmdHistory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into mntn_cmd_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="termId != null">
term_id,
</if>
@ -232,6 +229,9 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="termId != null">
#{termId,jdbcType=INTEGER},
</if>

Loading…
Cancel
Save