package com.huimv.admin.controller;


import com.huimv.admin.common.utils.Result;
import com.huimv.admin.service.IEnergyFeedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

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

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-02-14
 */
@RestController
@RequestMapping("/energy-feed")
@CrossOrigin
public class EnergyFeedController {

    @Autowired
    private IEnergyFeedService energyFeedService;

    @RequestMapping("/listPigpen")
    public Result listPigpen(HttpServletRequest httpServletRequest, @RequestBody Map<String,String> paramsMap) {
        return energyFeedService.listPigpen(httpServletRequest, paramsMap);
    }

    @RequestMapping("/listData")
    public Result listData(HttpServletRequest httpServletRequest, @RequestBody Map<String,String> paramsMap) {
        return energyFeedService.listData(httpServletRequest, paramsMap);
    }
    //app
    @RequestMapping("/listPigpenApp")
    public Result listPigpenApp(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return energyFeedService.listPigpenApp(httpServletRequest, paramsMap);
    }


}
