Newer
Older
smartwell_demos / src / main / java / com / casic / controller / ThirdDataController.java
chaizhuang on 24 Sep 2022 850 bytes 硫化氢新增
package com.casic.controller;

import com.casic.model.PressureDataParam;
import com.casic.service.ThirdDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/push")
@Slf4j
public class ThirdDataController {

    private final ThirdDataService thirdDataService;

    public ThirdDataController(ThirdDataService thirdDataService) {
        this.thirdDataService = thirdDataService;
    }

    @RequestMapping("/pressure/data")
    public Object getDeviceRecentData(@RequestBody PressureDataParam pressureData) {
        return thirdDataService.getDeviceRecentData(pressureData);
    }

}