package com.sky.ioc.controller.scene;

import com.sky.ioc.entity.domain.security.SecurityDoorRecord;
import com.sky.ioc.entity.params.scene.DoorAccessParam;
import com.sky.ioc.entity.params.scene.ParkParam;
import com.sky.ioc.service.parking.ParkService;
import com.sky.ioc.service.security.SecurityDoorRecordService;
import com.sky.ioc.tool.ReturnMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags ="智慧场景----智安防")
@Slf4j
@RestController
@RequestMapping("/security")
public class SecurityController {

    @Autowired
    SecurityDoorRecordService securityDoorRecordService;

    @Autowired
    ParkService parkService;

    @ApiOperation("门禁管理")
    @PostMapping("/getDoorAccessList")
    public ReturnMsg getDoorAccessList(@RequestBody DoorAccessParam doorAccessParam){

        return securityDoorRecordService.pageList(doorAccessParam);
    }

    @ApiOperation("停车管理")
    @PostMapping("/getParkList")
    public ReturnMsg getParkList(@RequestBody ParkParam parkParam){

        return parkService.pageList(parkParam);
    }
}
