package com.sptg.iot.biz.controller;

import cn.hutool.core.bean.BeanUtil;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.common.core.beans.ResultEnum;
import com.sptg.iot.api.dto.IotAlarmThresholdDto;
import com.sptg.iot.api.entity.IotAlarmThreshold;
import com.sptg.iot.api.entity.IotSysConf;
import com.sptg.iot.api.feigns.IotAlarmThresholdFeign;
import com.sptg.iot.biz.service.IotAlarmThresholdServiceInterface;
import com.sptg.iot.biz.service.IotSysConfServiceInterface;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

/**
 * @author zwx
 * @create 2020/10/19 23:28
 */
@RequiredArgsConstructor
@RestController
@Slf4j
public class IotAlarmThresholdController implements IotAlarmThresholdFeign {


    private final IotAlarmThresholdServiceInterface iotAlarmThresholdServiceInterface;

    @Override
    @PostMapping(value = "/iot/alarmThreshold/sync/list")
    public ResultBean<String> syncIotAlarmThresholdList(@RequestBody IotAlarmThresholdDto iotAlarmThresholdDto) {
        ResultBean<String> resultBean = this.iotAlarmThresholdServiceInterface.syncIotAlarmThresholdList(iotAlarmThresholdDto);
        return resultBean;
    }
}
