package com.huimv.admin.controller;


import com.huimv.admin.common.utils.Result;
import com.huimv.admin.common.utils.ResultCode;
import com.huimv.admin.entity.vo.CameraListVo;
import com.huimv.admin.entity.vo.CameraListsVo;
import com.huimv.admin.service.ICameraBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

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

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2023-02-16
 */
@CrossOrigin
@RestController
@RequestMapping("/admin/cameraBase")
public class CameraBaseController {
    @Autowired
    private ICameraBaseService cameraService;

    @PostMapping("/list")
    public Result list(@RequestBody CameraListVo cameraListVo) {
        return cameraService.listPage(cameraListVo);
    }
    @PostMapping("/getCameraDetails")
    private Result getCameraDetails(@RequestBody CameraListsVo cameraListsVo) {
       return cameraService.getCameraDetails(cameraListsVo);
    }

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