| | |
| | | import com.ycl.utils.DateUtils; |
| | | import constant.ApiConstants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | @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; |
| | | /** |
| | | * 调用海康接口 |
| | | * |
| | |
| | | public static <T> List<T> sendAPI(String apiUrl, BaseParam params, Class<T> resultType) { |
| | | |
| | | // STEP1:设置平台参数,根据实际情况,设置host appkey appsecret 三个参数. |
| | | ArtemisConfig.host = "51.92.65.49"; // 平台的ip端口 |
| | | ArtemisConfig.appKey = "29555942"; // 密钥appkey |
| | | ArtemisConfig.appSecret = "t9U7tCplCyYHzQPPL7cH";// 密钥appSecret |
| | | ArtemisConfig.host = host; // 平台的ip端口 |
| | | ArtemisConfig.appKey = appKey; // 密钥appkey |
| | | ArtemisConfig.appSecret = appSecret;// 密钥appSecret |
| | | |
| | | // STEP2:设置OpenAPI接口的上下文 |
| | | final String ARTEMIS_PATH = "/artemis"; |