package com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.sdgk;

import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.ISdgkApiService;
import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.qjmh.dto.QjmhBaseResult;
import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.sdgk.dto.SdgkEventAlarmDTO;
import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.sdgk.dto.SdgkEventHandleParamDTO;
import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.xlw.dto.XlwEventIdDTO;
import com.cico.nest.lcdp.boot.core.qxsd.infrastructure.gatewayimpl.http.sdgk.dto.SdgkEventAlarmResourceDTO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

import java.util.Map;


@Component
public class SdgkApiMapper implements ISdgkApiService {
    @Resource
    private SdgkClientFeign sdgkClientFeign;



    @Override
    public Map<String, Object> alarmHandle(SdgkEventHandleParamDTO body) {
        QjmhBaseResult<Map<String, Object>> result = sdgkClientFeign.alarmHandle(body);
        return result!=null?result.getResult():null;
    }

    @Override
    public Map<String, Object> alarmHandleEnd(XlwEventIdDTO body) {
        QjmhBaseResult<Map<String, Object>> result = sdgkClientFeign.alarmHandleEnd(body);
        return result!=null?result.getResult():null;
    }

    @Override
    public SdgkEventAlarmDTO alarmDetail(String id) {
        QjmhBaseResult<SdgkEventAlarmDTO> result = sdgkClientFeign.alarmDetail(id);
        return result!=null?result.getResult():null;
    }

    @Override
    public SdgkEventAlarmResourceDTO alarmResource(String alarmId) {
        SdgkEventAlarmResourceDTO result = sdgkClientFeign.alarmResource(alarmId);
        return result;
    }
}
