package com.ruoyi.applet.contoller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.model.service.IAppFeedingFoodService;
import com.ruoyi.model.service.IAppFeedingFoodTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(description = "喂养要求及食品类型")
@RestController
@RequestMapping("/applet/feedingFood")
public class AppletIAppFeedingFoodController extends BaseController {
    @Autowired
    private IAppFeedingFoodService appFeedingFoodService;

    @ApiOperation("查询服务记录中所有的喂养要求及其食品列表")
    @GetMapping("/getAppFeedingFoodList")
    public TableDataInfo getAppFeedingFoodList(){
        return getDataTable(appFeedingFoodService.getAppFeedingFoodList());
    }

    @Autowired
    private IAppFeedingFoodTypeService appFeedingFoodTypeService;

    @ApiOperation("查询食品类型")
    @GetMapping("/getAppFeedingFoodTypeList")
    public TableDataInfo getAppFeedingFoodTypeList(){
        return getDataTable(appFeedingFoodTypeService.getAppFeedingFoodTypeList());
    }
}
