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

import com.ruoyi.common.datascope.base.domain.BaseBusinessEntity;
import com.ruoyi.common.redis.service.RedisService;
import com.ruoyi.common.security.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class BaseService {

    @Autowired
    TokenService tokenService;

    @Autowired
    private RedisService redisService;


    @Value("${sooka.database.database_system:}")
    public String database_system;
    @Value("${sooka.database.database_event:}")
    public String database_event;
    @Value("${sooka.database.database_data:}")
    public String database_data;

    @Value("${sooka.dahua_video_server.loginIp:}")
    public String loginIp;
    @Value("${sooka.dahua_video_server.userName:}")
    public String userName;
    @Value("${sooka.dahua_video_server.userPwd:}")
    public String userPwd;
    @Value("${sooka.dahua_video_server.loginPort:}")
    public Integer loginPort;


    //app
    @Value("${sooka.dahua_video_server_app.loginIpApp:}")
    public String loginIpApp;
    @Value("${sooka.dahua_video_server_app.userNameApp:}")
    public String userNameApp;
    @Value("${sooka.dahua_video_server_app.userPwdApp:}")
    public String userPwdApp;
    @Value("${sooka.dahua_video_server_app.loginPortApp:}")
    public Integer loginPortApp;

    //
    @Value("${sooka.dahua_dss_server.host:}")
    public String host;
    @Value("${sooka.dahua_dss_server.user_name:}")
    public String user_name;
    @Value("${sooka.dahua_dss_server.password:}")
    public String password;
    @Value("${sooka.dahua_dss_server.client_id:}")
    public String client_id;
    @Value("${sooka.dahua_dss_server.client_secret:}")
    public String client_secret;
    @Value("${sooka.dahua_dss_server.version:}")
    public String version;
    @Value("${sooka.dahua_dss_server.video_download_url_linux:}")
    public String videoDownloadUrlLinux;
    @Value("${sooka.dahua_dss_server.video_download_url_win:}")
    public String videoDownloadUrlWin;


    @Value("${sooka.haikang_video_server.loginIp:}")
    public String HkloginIp;
    @Value("${sooka.haikang_video_server.appkey:}")
    public String Hkappkey;
    @Value("${sooka.haikang_video_server.secret:}")
    public String Hksecret;
    @Value("${sooka.haikang_video_server.loginPort:}")
    public String HkloginPort;


    public void setSookaDataBase(BaseBusinessEntity entity){
        entity.setDatabase_system(this.database_system);
        entity.setDatabase_event(this.database_event);
        entity.setDatabase_data(this.database_data);
    }

}

