package com.huimv.environ.eco.controller;


import com.huimv.common.utils.Result;
import com.huimv.environ.eco.service.IEggDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2022-06-22
 */
@RestController
@RequestMapping("/eggData")
public class EggDataController {
    @Autowired
    private IEggDataService eggDataService;

    @PostMapping("/getAll")
    public Result getAll(@RequestBody Map<String,String> map){
        return eggDataService.getAll(map);
    }

    @PostMapping("/getOneData")
    public Result getOneData(@RequestBody Map<String,String> map){
        return eggDataService.getOneData(map);
    }

    @PostMapping("/getAllFood")
    public Result getAllFood(@RequestBody Map<String,String> map){
        return eggDataService.getAllFood(map);
    }

    @PostMapping("/getOneFood")
    public Result getOneFood(@RequestBody Map<String,String> map){
        return eggDataService.getOneFood(map);
    }
}
