修改菜品
This commit is contained in:
@@ -10,6 +10,26 @@
|
||||
values (#{name}, #{categoryId}, #{price}, #{image}, #{description}, #{status}, #{createTime}, #{updateTime},
|
||||
#{createUser}, #{updateUser})
|
||||
</insert>
|
||||
<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>
|
||||
<delete id="deleteByIds">
|
||||
delete from dish where id in
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="pageQuery" resultType="com.sky.vo.DishVO">
|
||||
select dish.*, category.name as categoryName
|
||||
from dish
|
||||
|
||||
Reference in New Issue
Block a user