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