package com.younike.admin;

import com.younike.common.core.controller.BaseController;
import com.younike.common.core.page.TableDataInfo;
import com.younike.system.domain.vo.AccessPasscodeVO;
import com.younike.system.service.IAccessPasscodeVerifyRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("门岗通行记录接口")
@RestController
@RequestMapping("/admin/accessPasscode")
public class AdminAccessPasscodeController extends BaseController {
    @Autowired
    private IAccessPasscodeVerifyRecordService accessPasscodeVerifyRecordService;

    @ApiOperation("查询门岗通行记录列表")
    @GetMapping("/list")
    public TableDataInfo list(AccessPasscodeVO accessPasscode) {
        startPage();
        List<AccessPasscodeVO> list = accessPasscodeVerifyRecordService.selectAccessPasscodeVoList(accessPasscode);
        return getDataTable(list);
    }
}
