在insert标签中加入
dishMapper.updateDish();
示例代码:
XML
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
insert into dish (name,category_id,price,image,description,create_time,update_time,create_user,update_user,status)
values
(#{name},#{categoryId},#{price},#{image},#{description},#{createTime},#{updateTime},#{createUser},#{updateUser},#{status})
</insert>