package com.yeejoin.amos.boot.module.jcs.biz.service.impl;

import com.yeejoin.amos.boot.biz.common.service.IHomePageService;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;

import javax.annotation.PostConstruct;

/**
 * @description:
 * @author: tw
 * @createDate: 2021/9/8
 */
@Service
public class FaultServiceImpl implements IHomePageService {

    @Autowired
    EquipFeignClient quipFeignClient;
    private  static  EquipFeignClient quipFeignClient1;

    @PostConstruct
    public void init(){
        quipFeignClient1=  quipFeignClient;
    }

    //火警
    @Override
    public Object getHomePageData() {

        ResponseModel<Integer> data=   quipFeignClient1.getCountAlarm("BREAKDOWN");
        return data!=null?data.getResult():0;
    }
}
