k94314517
2024-10-17 ffa60e83ae945bdd164ce047a2c70a55e9f54ee2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.doumee.service.business.impl;
 
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.HKTools;
import com.doumee.core.utils.Constants;
import com.doumee.service.business.InterfaceLogService;
import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import javax.annotation.PostConstruct;
 
/**
 * 海康事件订阅表Service实现
 * @author 江蹄蹄
 * @date 2023/11/30 15:33
 */
@Service
public class InitServiceImpl extends HkSyncBaseServiceImpl {
 
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Autowired
    private InterfaceLogService interfaceLogService;
 
    @PostConstruct
    public  int  initHkConfig(){
            ArtemisConfig.host = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode();
            ArtemisConfig.appKey = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode();
            ArtemisConfig.appSecret = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPSECRET).getCode();
            HKConstants.https = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HTTPS).getCode();
        HKTools.interfaceLogService=interfaceLogService;
        return  0;
    }
 
}