新增套餐、套餐分页查询、根据分类id查询菜品

This commit is contained in:
slhaf
2024-09-12 20:02:21 +08:00
parent 5419e321c8
commit e223fbb1a8
19 changed files with 209 additions and 14 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sky.mapper.SetmealMapper">
<insert id="insert">
insert into setmeal(category_id, name, price, status, description, image, create_time, update_time, create_user,
update_user)
VALUES (#{categoryId}, #{name}, #{price}, #{status}, #{description}, #{image}, #{createTime}, #{updateTime},
#{createUser}, #{updateUser})
</insert>
<select id="pageQuery" resultType="com.sky.entity.Setmeal">
select * from setmeal
<where>
<if test="name != null">and name like concat('%',name,'%')</if>
<if test="categoryId != null">and category_id = #{categoryId}</if>
<if test="status != null">and status = #{status}</if>
</where>
</select>
</mapper>