mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 23:08:35 +08:00
lianlianService使用新的加密方法
This commit is contained in:
@@ -420,9 +420,10 @@ public interface ThirdPartyPlatformService {
|
|||||||
|
|
||||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||||
// 加密数据
|
// 加密数据
|
||||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
// byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(vo).getBytes(),
|
||||||
dataSecret.getBytes(), dataSecretIv.getBytes());
|
// dataSecret.getBytes(), dataSecretIv.getBytes());
|
||||||
String encryptData = Encodes.encodeBase64(encryptText);
|
// String encryptData = Encodes.encodeBase64(encryptText);
|
||||||
|
String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(vo), dataSecret, dataSecretIv);
|
||||||
|
|
||||||
resultMap.put("Data", encryptData);
|
resultMap.put("Data", encryptData);
|
||||||
// 生成sig
|
// 生成sig
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import com.jsowell.pile.vo.uniapp.BillingPriceVO;
|
|||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.thirdparty.lianlian.domain.*;
|
import com.jsowell.thirdparty.lianlian.domain.*;
|
||||||
import com.jsowell.thirdparty.lianlian.util.Cryptos;
|
import com.jsowell.thirdparty.lianlian.util.Cryptos;
|
||||||
import com.jsowell.thirdparty.lianlian.util.Encodes;
|
|
||||||
import com.jsowell.thirdparty.lianlian.util.GBSignUtils;
|
import com.jsowell.thirdparty.lianlian.util.GBSignUtils;
|
||||||
import com.jsowell.thirdparty.lianlian.util.HttpRequestUtil;
|
import com.jsowell.thirdparty.lianlian.util.HttpRequestUtil;
|
||||||
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
|
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
|
||||||
@@ -174,18 +173,13 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
map.put("ItemSize", resultList.size());
|
map.put("ItemSize", resultList.size());
|
||||||
map.put("StationInfos", resultList);
|
map.put("StationInfos", resultList);
|
||||||
|
|
||||||
// 加密
|
|
||||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||||
// 加密数据
|
// 加密数据
|
||||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv());
|
||||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
|
||||||
String encryptData = Encodes.encodeBase64(encryptText);
|
|
||||||
|
|
||||||
resultMap.put("Data", encryptData);
|
resultMap.put("Data", encryptData);
|
||||||
// 生成sig
|
// 生成sig
|
||||||
String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
||||||
resultMap.put("Sig", resultSign);
|
resultMap.put("Sig", resultSign);
|
||||||
|
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,18 +260,13 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
map.put("Total", total);
|
map.put("Total", total);
|
||||||
map.put("StationStatusInfos", collect);
|
map.put("StationStatusInfos", collect);
|
||||||
|
|
||||||
// 加密
|
|
||||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||||
// 加密数据
|
// 加密数据
|
||||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv());
|
||||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
|
||||||
String encryptData = Encodes.encodeBase64(encryptText);
|
|
||||||
|
|
||||||
resultMap.put("Data", encryptData);
|
resultMap.put("Data", encryptData);
|
||||||
// 生成sig
|
// 生成sig
|
||||||
String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
||||||
resultMap.put("Sig", resultSign);
|
resultMap.put("Sig", resultSign);
|
||||||
|
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,18 +354,13 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("StationStats", stationStatsInfo);
|
map.put("StationStats", stationStatsInfo);
|
||||||
|
|
||||||
// 加密
|
|
||||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||||
// 加密数据
|
// 加密数据
|
||||||
byte[] encryptText = Cryptos.aesEncrypt(JSON.toJSONString(map).getBytes(),
|
String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv());
|
||||||
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
|
||||||
String encryptData = Encodes.encodeBase64(encryptText);
|
|
||||||
|
|
||||||
resultMap.put("Data", encryptData);
|
resultMap.put("Data", encryptData);
|
||||||
// 生成sig
|
// 生成sig
|
||||||
String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
||||||
resultMap.put("Sig", resultSign);
|
resultMap.put("Sig", resultSign);
|
||||||
|
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user