63 lines
1.2 KiB
Java
63 lines
1.2 KiB
Java
package com.sky.service;
|
|
|
|
import com.sky.dto.DishDTO;
|
|
import com.sky.dto.DishPageQueryDTO;
|
|
import com.sky.entity.Dish;
|
|
import com.sky.result.PageResult;
|
|
import com.sky.vo.DishVO;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import java.util.List;
|
|
|
|
@Service
|
|
public interface DishService {
|
|
|
|
/**
|
|
* 新增菜品
|
|
* @param dishDTO
|
|
*/
|
|
void saveWithFlavor(DishDTO dishDTO);
|
|
|
|
/**
|
|
* 菜品分页查询
|
|
* @param pageQueryDTO
|
|
* @return
|
|
*/
|
|
PageResult pageQuery(DishPageQueryDTO pageQueryDTO);
|
|
|
|
/**
|
|
* 菜品批量删除
|
|
* @param ids
|
|
*/
|
|
void deleteBatch(List<Long> ids);
|
|
|
|
/**
|
|
* 根据id查询菜品及口味
|
|
* @param id
|
|
* @return
|
|
*/
|
|
DishVO getByIdWithFlavor(Long id);
|
|
|
|
/**
|
|
* 修改菜品基本信息(及口味)
|
|
* @param dishDTO
|
|
*/
|
|
void updateWithFlavor(DishDTO dishDTO);
|
|
|
|
/**
|
|
* 根据分类id查询菜品
|
|
* @param categoryId
|
|
* @return
|
|
*/
|
|
List<Dish> selectByCategoryId(Long categoryId);
|
|
|
|
/**
|
|
* 菜品起售停售
|
|
* @param status
|
|
* @param id
|
|
*/
|
|
void startOrStop(Integer status, Long id);
|
|
|
|
List<DishVO> getDishVoByCategoryId(Long categoryId);
|
|
}
|