package cn.iocoder.yudao.module.system.api.dish;


import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.system.api.dish.dto.DishesRespDto;
import cn.iocoder.yudao.module.system.dal.dataobject.dishes.DishesDO;
import cn.iocoder.yudao.module.system.service.dishes.DishesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 菜品营养 Service 接口
 *
 * @author 开发账号
 */
@Service
public class DishesApiImpl implements DishesApi {

    @Resource
    private DishesService dishesService;

    @Override
    public DishesRespDto getDish(Long id) {
        DishesDO dishes = dishesService.getDishes(id);
        return BeanUtils.toBean(dishes,DishesRespDto.class);
    }
}