苍穹外卖--菜品管理-修改功能实现
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
values (#{name},#{categoryId},#{price},#{image},#{description},#{createTime},#{updateTime},#{createUser},#{updateUser},#{status})
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="pageQuery" resultType="com.sky.vo.DishVO">
|
||||
SELECT d.*,c.name categoryName FROM dish d LEFT JOIN category c ON d.category_id = c.id
|
||||
<where>
|
||||
@@ -32,4 +33,19 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="update">
|
||||
update dish
|
||||
<set>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="image != null">image = #{image},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateUser != null">update_user = #{updateUser},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user