fuliqi
2024-09-11 b14531e3b850fe6d2fa916ba7b88b3e2bd2ff30a
ycl-server/src/main/java/com/ycl/feign/HkApiUtil.java
@@ -25,12 +25,7 @@
@Slf4j
public class HkApiUtil {
    @Value("${HK.host}")
    public static String host;
    @Value("${HK.appKey}")
    public static String appKey;
    @Value("${HK.appSecret}")
    public static String appSecret;
    /**
     * 调用海康接口
     *
@@ -39,8 +34,7 @@
     * @param resultType 响应结果接收类
     * @return 调用结果
     */
    public static <T> List<T> sendAPI(String apiUrl, BaseParam params, Class<T> resultType) {
    public static <T> List<T> sendAPI(String host,String appKey,String appSecret,String apiUrl, BaseParam params, Class<T> resultType) {
        // STEP1:设置平台参数,根据实际情况,设置host appkey appsecret 三个参数.
        ArtemisConfig.host = host; // 平台的ip端口
        ArtemisConfig.appKey = appKey;  // 密钥appkey
@@ -62,7 +56,6 @@
        // STEP5:组装请求参数
        String body = JSON.toJSONString(params);
        log.info("请求参数:{}",body);
        // STEP6:调用接口
        String result = null;// post请求application/json类型参数
        List<T> dataList = new ArrayList<>();