package com.rehome.mqttclienttemperature.controller;

import com.rehome.mqttclienttemperature.dto.RequestNowTemperatureDto;
import com.rehome.mqttclienttemperature.dto.RequestTemperatureDto;
import com.rehome.mqttclienttemperature.entity.Temperature;
import com.rehome.mqttclienttemperature.response.Result;
import com.rehome.mqttclienttemperature.service.TemperatureEspService;
import com.rehome.mqttclienttemperature.service.TemperatureService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


import javax.annotation.Resource;
import java.util.List;

/**
 * @author HuangWenfei
 * App自动更新
 * 2024-10-16 11:11
 */

@Slf4j
@RestController
@CrossOrigin
@RequestMapping("/web/temperature/esp")
public class TemperatureEspController {
    @Resource
    private TemperatureEspService temperatureEspService;

    /**
     * APP更新版本号
     */
    @GetMapping("/saveEspTemperature")
    private String save(@Param("temperature")String temperature, @Param("humidity")String humidity) {
        log.info(temperature);
        log.info(humidity);
        //this.temperatureEspService.saveTemperature(temperature,humidity);
        return "success";
    }
}
