mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 高德地图工具类
This commit is contained in:
@@ -6,6 +6,7 @@ import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
@@ -19,22 +20,38 @@ import java.util.*;
|
||||
/**
|
||||
* 高德地图工具类
|
||||
*/
|
||||
@Component
|
||||
public class AMapUtils {
|
||||
private static String MERCHANT_PRIVATE_KEY;
|
||||
private static String AMAP_PUBLIC_KEY;
|
||||
private static String APP_ID;
|
||||
private static String DEV_URL;
|
||||
private static String PRD_URL;
|
||||
|
||||
@Value("${aMap.merchantPrivateKey}")
|
||||
private static String MERCHANT_PRIVATE_KEY;
|
||||
public static void setMerchantPrivateKey(String merchantPrivateKey) {
|
||||
AMapUtils.MERCHANT_PRIVATE_KEY = merchantPrivateKey;
|
||||
}
|
||||
|
||||
@Value("${aMap.aMapPublicKey}")
|
||||
private static String AMAP_PUBLIC_KEY;
|
||||
public void setAmapPublicKey(String amapPublicKey) {
|
||||
AMapUtils.AMAP_PUBLIC_KEY = amapPublicKey;
|
||||
}
|
||||
|
||||
@Value("${aMap.appId}")
|
||||
private static String APP_ID;
|
||||
public void setAppId(String appId) {
|
||||
AMapUtils.APP_ID = appId;
|
||||
}
|
||||
|
||||
@Value("${aMap.devUrl}")
|
||||
private static String DEV_URL;
|
||||
public void setDevUrl(String devUrl) {
|
||||
AMapUtils.DEV_URL = devUrl;
|
||||
}
|
||||
|
||||
@Value("${aMap.prdUrl}")
|
||||
private static String PRD_URL;
|
||||
public void setPrdUrl(String prdUrl) {
|
||||
AMapUtils.PRD_URL = prdUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用商家私钥生成签名
|
||||
|
||||
Reference in New Issue
Block a user