49 lines
1.1 KiB
Java
49 lines
1.1 KiB
Java
|
package com.sky.service.impl;
|
||
|
|
||
|
import com.sky.entity.Setmeal;
|
||
|
import com.sky.mapper.DishMapper;
|
||
|
import com.sky.mapper.SetMealDishMapper;
|
||
|
import com.sky.mapper.SetmealMapper;
|
||
|
import com.sky.service.SetmealService;
|
||
|
import com.sky.vo.DishItemVO;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.stereotype.Service;
|
||
|
|
||
|
import javax.annotation.Resource;
|
||
|
import java.util.List;
|
||
|
|
||
|
/**
|
||
|
* 套餐业务实现
|
||
|
*/
|
||
|
@Service
|
||
|
@Slf4j
|
||
|
public class SetmealServiceImpl implements SetmealService {
|
||
|
|
||
|
@Resource
|
||
|
private SetmealMapper setmealMapper;
|
||
|
@Resource
|
||
|
private SetMealDishMapper setmealDishMapper;
|
||
|
@Resource
|
||
|
private DishMapper dishMapper;
|
||
|
|
||
|
/**
|
||
|
* 条件查询
|
||
|
*
|
||
|
* @param setmeal Setmeal
|
||
|
* @return List<Setmeal>
|
||
|
*/
|
||
|
public List<Setmeal> list(Setmeal setmeal) {
|
||
|
return setmealMapper.list(setmeal);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 根据id查询菜品选项
|
||
|
*
|
||
|
* @param id Long
|
||
|
* @return List<DishItemVO>
|
||
|
*/
|
||
|
public List<DishItemVO> getDishItemById(Long id) {
|
||
|
return setmealMapper.getDishItemBySetmealId(id);
|
||
|
}
|
||
|
}
|