外卖项目day03-套餐管理-全部功能实现
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user