package com.sooka.sponest.monitor.haikang.service.impl;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.sooka.sponest.monitor.base.service.impl.BaseService;
import com.sooka.sponest.monitor.camera.mapper.CentermonitorTCamerachannelMapper;
import com.sooka.sponest.monitor.haikang.domain.HaiKangCameraBO;
import com.sooka.sponest.monitor.haikang.service.HaiKangService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class HaiKangServiceImpl extends BaseService implements HaiKangService {



    @Resource
    private CentermonitorTCamerachannelMapper centermonitorTCamerachannelMapper;

    /**
     * 获取海康视频服务
     * */
    @Override
    public AjaxResult getHaiKangVideoServer(String cameraCode) {
        HaiKangCameraBO haiKangCameraBO = centermonitorTCamerachannelMapper.getHaiKangVideoServer(cameraCode);
        if(haiKangCameraBO ==null) haiKangCameraBO = new HaiKangCameraBO();
        haiKangCameraBO.setLoginIp(HkloginIp);
        haiKangCameraBO.setAppkey(Hkappkey);
        haiKangCameraBO.setSecret(Hksecret);
        haiKangCameraBO.setLoginPort(HkloginPort);
        return AjaxResult.success(haiKangCameraBO);
    }
}
