package com.usky.ids.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.ids.domain.AccessAlarm;
import com.usky.ids.service.AccessAlarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 * 报警信息表 前端控制器
 * </p>
 *
 * @author han
 * @since 2025-03-01
 */
@RestController
@RequestMapping("/accessAlarm")
public class AccessAlarmController {
    @Autowired
    private AccessAlarmService accessAlarmService;

    /**
     * 告警查询接口
     * @return
     */
    @GetMapping("/getAlarmList")
    public ApiResult<List<AccessAlarm>> getAlarmList(@RequestParam(value = "deviceId", required = false) String deviceId){
        return ApiResult.success(accessAlarmService.getAlarmList(deviceId));
    }
}

