package com.huimv.environ.eco.controller;


import com.huimv.common.utils.Result;
import com.huimv.environ.eco.service.ISysDayWaterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/dayWater")
public class SysDayWaterController {

    @Autowired
    private ISysDayWaterService dayWaterService;

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

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

    @GetMapping("/listAllWaterAndPower")
    public Result listAllWaterAndPower(@RequestParam(name = "farmId") Integer farmId){
        return dayWaterService.listAllWaterAndPower(farmId);
    }

}
