RemoteAlarmService.java
1.06 KB
package cn.com.glsx.admin.modules.remote;
import cn.com.glsx.alarm.api.AlarmFeignClient;
import cn.com.glsx.alarm.services.model.PowerOffBo;
import com.glsx.plat.core.web.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* AlarmFeignClient 服务的处理层
*
* @author yll
*/
@Slf4j
@Service
public class RemoteAlarmService {
@Autowired
private AlarmFeignClient alarmFeignClient;
public Integer getPowerOffAlertCount(List<String> sns, String startTime, String endTime) {
PowerOffBo powerOffBo = new PowerOffBo();
powerOffBo.setSns(sns);
powerOffBo.setStartTime(startTime);
powerOffBo.setEndTime(endTime);
R<Integer> powerOffAlertCountR = alarmFeignClient.getPowerOffAlertCount(powerOffBo);
Integer powerOffAlertCount = powerOffAlertCountR.getData(Integer.class);
if (powerOffAlertCount == null) {
powerOffAlertCount = 0;
}
return powerOffAlertCount;
}
}