package com.huimv.admin.controller;


import com.huimv.admin.common.utils.Result;
import com.huimv.admin.service.IProtDataService;
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("/prot-data")
@CrossOrigin
public class ProtDataController {
    @Autowired
    private IProtDataService protDataService;

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

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

    @RequestMapping("/listWarning")
    public Result listWarning(HttpServletRequest httpServletRequest, @RequestBody Map<String,String> paramsMap) {
        return protDataService.listProt(httpServletRequest,paramsMap);
    }
    @RequestMapping("/listType")
    public Result listType(HttpServletRequest httpServletRequest, @RequestBody Map<String,String> paramsMap) {
        return protDataService.listType(httpServletRequest,paramsMap);
    }

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