package com.huimv.receiver.farm.controller;

import com.huimv.receiver.farm.service.IAlarm;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Project : huimv.shiwan
 * @Package : com.huimv.biosafety.uface.controller
 * @Description : TODO
 * @Version : 1.0
 * @Author : ZhuoNing
 * @Create : 2020-12-25
 **/
@CrossOrigin
@RestController
@Slf4j
@RequestMapping(value = "/receiver/alarm")
public class AlarmController {
    @Autowired
    private IAlarm iAlarm;

    //发送环境警报信息
    @RequestMapping(value = "/environ/putEnvironAlarm",method = RequestMethod.POST)
    public void putEnvironAlarm(@RequestParam(value = "data",required = true) String alarmInfo){
        //处理环境警报
        iAlarm.handleEnvironAlarm(alarmInfo);
    }
}
