外卖项目day03-套餐管理-全部功能实现

This commit is contained in:
xx
2026-11-21 15:14:09 +08:00
parent 8521b1f25a
commit f23e7acf53
13 changed files with 555 additions and 20 deletions
@@ -11,6 +11,8 @@ import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface DishMapper {
@@ -59,4 +61,20 @@ public interface DishMapper {
void update(Dish dish);
void startOrStop(Integer status, Long id);
/**
* 动态条件查询菜品
* @param dish
* @return
*/
List<Dish> list(Dish dish);
/**
* 根据套餐id查询菜品
* @param setmealId
* @return
*/
@Select("select a.* from dish a left join setmeal_dish b on a.id = b.dish_id where b.setmeal_id = #{setmealId}")
List<Dish> getBySetmealId(Long setmealId);
}