This commit is contained in:
Guoqs
2024-05-30 14:28:00 +08:00

View File

@@ -589,10 +589,8 @@ public class NinaXiaPlatformServiceImpl implements ThirdPartyPlatformService {
} }
String data = map.get("Data"); String data = map.get("Data");
// 解密data (此处解密需用 thirdparty_platform_config 的密钥配置) // 解密data (此处解密需用 thirdparty_platform_config 的密钥配置)
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(operatorIdByType);
ThirdPartySecretInfoVO thirdPartySecretInfoVO = thirdpartySecretInfoService.queryByThirdPlatformType(thirdPlatformType);
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(data), byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(data),
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes()); ningXiaSecretInfo.getOurDataSecret().getBytes(), ningXiaSecretInfo.getOurDataSecretIv().getBytes());
String dataStr = new String(plainText, StandardCharsets.UTF_8); String dataStr = new String(plainText, StandardCharsets.UTF_8);
// 转成对应的对象 // 转成对应的对象
QueryChargingStatusVO vo = JSONObject.parseObject(dataStr, QueryChargingStatusVO.class); QueryChargingStatusVO vo = JSONObject.parseObject(dataStr, QueryChargingStatusVO.class);