package com.usky.agbox.controller.api;

import com.alibaba.fastjson.JSONObject;
import com.usky.agbox.RemotePatrolAgBoxService;
import com.usky.agbox.service.job.patrolAgbox;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author han
 * @date 2024/04/02 11:21
 */
@RestController
public class patrolAgboxControllerApi implements RemotePatrolAgBoxService {

    @Autowired
    private patrolAgbox agBox;

    @Override
    public JSONObject getEventCode() {
        return agBox.getEventCode();
    }

    @Override
    public JSONObject getDeviceList() {
        return agBox.getDeviceList();
    }

    @Override
    public JSONObject updateHeart(@RequestBody String requestBody){
        return agBox.updateHeart(requestBody);
    }

    @Override
    public JSONObject addEvent(@RequestBody String requestBody){
        return agBox.addEvent(requestBody);
    }

    @Override
    public JSONObject getEvent(@RequestBody String requestBody){
        return agBox.getEvent(requestBody);
    }
}
