package com.huimv.beeboxs.controller;


import com.huimv.beeboxs.common.utils.Result;
import com.huimv.beeboxs.service.IHiveBeehiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2022-04-21
 */
@CrossOrigin
@RestController
@RequestMapping("/hiveBeehive")
public class HiveBeehiveController {

    @Autowired
    private IHiveBeehiveService beehiveService;

    @PostMapping("/list")
    public Result page(@RequestBody Map map){

        return beehiveService.searchList(map);
    }
    @PostMapping("/listExcel")
    public void listExcel(@RequestBody Map map , HttpServletResponse response)   {
        beehiveService.listExcel(map,response);
    }

}
