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:
@@ -577,12 +577,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("Total", total);
|
||||
map.put("StationStatusInfos", collect);
|
||||
// LianLianPageResponse response = LianLianPageResponse.builder()
|
||||
// .PageCount(pages)
|
||||
// .PageNo(pageNum)
|
||||
// .list(collect)
|
||||
// .ItemSize(total)
|
||||
// .build();
|
||||
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
@@ -1480,8 +1475,6 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
|
||||
|
||||
|
||||
// 获取令牌
|
||||
String token = "";
|
||||
String result = "";
|
||||
|
||||
@@ -105,7 +105,25 @@ public class HttpRequestUtil {
|
||||
* @return
|
||||
*/
|
||||
public static String sendPost(String token, String data, String url, String dataSecret,
|
||||
String dataSecretIV, String operatorId, String sigSecret){
|
||||
String dataSecretIV, String operatorId, String sigSecret) {
|
||||
return HttpRequestUtil.sendPost(token, data, url, dataSecret, dataSecretIV, operatorId, sigSecret, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送请求
|
||||
*
|
||||
* @param token 令牌
|
||||
* @param data 要传输的JsonString格式数据
|
||||
* @param url 请求地址
|
||||
* @param dataSecret 消息密钥
|
||||
* @param dataSecretIV 消息密钥初始化向量
|
||||
* @param operatorId 运营商id
|
||||
* @param sigSecret 签名密钥
|
||||
* @return
|
||||
*/
|
||||
public static String sendPost(String token, String data, String url, String dataSecret,
|
||||
String dataSecretIV, String operatorId, String sigSecret,
|
||||
String thirdPlatformType) {
|
||||
String type = ThirdPartyOperatorIdEnum.getTypeByOperatorId(operatorId);
|
||||
String label = ThirdPlatformTypeEnum.getLabelByCode(type);
|
||||
if(StringUtils.isBlank(label)) {
|
||||
@@ -123,6 +141,12 @@ public class HttpRequestUtil {
|
||||
params.put("Data", encryptData);
|
||||
params.put("TimeStamp", DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, new Date()));
|
||||
params.put("Seq", "001");
|
||||
|
||||
// 此处是与其他获取令牌方法唯一不同之处,甬城泊车获取令牌需要添加此字段
|
||||
if (ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode().equals(thirdPlatformType)) {
|
||||
params.put("Portname", "wcc-pro");
|
||||
}
|
||||
|
||||
String sign = GBSignUtils.sign(params, sigSecret);
|
||||
params.put("Sig", sign);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user