外卖项目day03-删除菜品-需求分析和功能实现---2
This commit is contained in:
@@ -7,6 +7,7 @@ import com.sky.entity.Dish;
|
||||
import com.sky.entity.Employee;
|
||||
import com.sky.enumeration.OperationType;
|
||||
import com.sky.vo.DishVO;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@@ -42,4 +43,11 @@ public interface DishMapper {
|
||||
*/
|
||||
@Select("select * from dish where id = #{id}")
|
||||
Dish getDishById(Long id);
|
||||
|
||||
/**
|
||||
* 根据id删除菜品
|
||||
* @param dishId
|
||||
*/
|
||||
@Delete("delete from dish where id = #{dishId}")
|
||||
void deleteById(Long dishId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user