package com.yx.face.controller.admin;

import com.yx.face.boot.restful.RestResponse;
import com.yx.face.boot.restful.RestResult;
import com.yx.face.model.vo.AdminDataVO;
import com.yx.face.model.vo.AdminDeviceVO;
import com.yx.face.service.AdminDataShowService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @ClassName AdminDataShow
 * @Author WXG
 * @Date 2021/11/12 13:40
 */
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@Api(tags = "B 数据大屏显示")
@RestController
@RequestMapping("admin/dataShow")
public class AdminDataShowController {

    private final AdminDataShowService adminDataShowService;

    @ApiOperation("获取设备数量")
    @PostMapping("getDeviceNumber")
    public RestResult<AdminDeviceVO> getDeviceNumber() {
        return RestResponse.ok(adminDataShowService.getDeviceNumber());
    }
    @ApiOperation("获取通行信息")
    @PostMapping("getAdminData")
    public RestResult<AdminDataVO> getAdminData() {
        return RestResponse.ok(adminDataShowService.getAdminData());
    }
}
