苍穹外卖--菜品管理-删除功能实现

This commit is contained in:
2025-11-11 14:29:45 +08:00
parent 6cf6f4ef41
commit 85cd67f345
9 changed files with 121 additions and 0 deletions

View File

@@ -12,4 +12,10 @@ public interface DishFlavorMapper {
* @param flavors
*/
void insertBath(List<DishFlavor> flavors);
/**
* 菜品口味的批量删除
* @param ids
*/
void deleteBath(List<Long> ids);
}

View File

@@ -10,6 +10,8 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface DishMapper {
@@ -34,4 +36,18 @@ public interface DishMapper {
* @return
*/
Page<DishVO> pageQuery(DishPageQueryDTO dto);
/**
* 根据菜品id查询菜品数据
* @param id
* @return
*/
@Select("select * from dish where id = #{id}")
Dish getById(Long id);
/**
* 批量删除菜品
* @param ids
*/
void deleteBath(List<Long> ids);
}

View File

@@ -0,0 +1,20 @@
package com.sky.mapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 菜品--套餐--中间表setmeal_dish
*/
@Mapper
public interface SetmealDishMapper {
/**
* 根据多个菜品id查询关联的套餐id
* @param ids
* @return
*/
List<Long> getSetmealIdsByDishIds(List<Long> ids);
}