mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 01:50:17 +08:00
update 对接内蒙古平台
This commit is contained in:
@@ -192,8 +192,9 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
// 未查到数据
|
// 未查到数据
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
// ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
||||||
if (configInfo == null) {
|
ThirdPartySecretInfoVO thirdPartySecretInfoVO = thirdpartySecretInfoService.queryByThirdPlatformType(thirdPlatformType);
|
||||||
|
if (thirdPartySecretInfoVO == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
PageInfo<ThirdPartyStationInfoVO> pageInfo = new PageInfo<>(stationInfos);
|
PageInfo<ThirdPartyStationInfoVO> pageInfo = new PageInfo<>(stationInfos);
|
||||||
@@ -244,7 +245,7 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
map.put("PageCount", pageInfo.getPages());
|
map.put("PageCount", pageInfo.getPages());
|
||||||
map.put("ItemSize", resultList.size());
|
map.put("ItemSize", resultList.size());
|
||||||
map.put("StationInfos", resultList);
|
map.put("StationInfos", resultList);
|
||||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, configInfo);
|
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,8 +260,9 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
List<String> stationIds = dto.getStationIds();
|
List<String> stationIds = dto.getStationIds();
|
||||||
List<StationStatusInfo> StationStatusInfos = new ArrayList<>();
|
List<StationStatusInfo> StationStatusInfos = new ArrayList<>();
|
||||||
List<Object> connectorStatusInfos = new ArrayList<>();
|
List<Object> connectorStatusInfos = new ArrayList<>();
|
||||||
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
// ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
||||||
if (configInfo == null) {
|
ThirdPartySecretInfoVO thirdPartySecretInfoVO = thirdpartySecretInfoService.queryByThirdPlatformType(thirdPlatformType);
|
||||||
|
if (thirdPartySecretInfoVO == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ConnectorStatusInfo connectorStatusInfo;
|
ConnectorStatusInfo connectorStatusInfo;
|
||||||
@@ -322,7 +324,7 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
map.put("Total", total);
|
map.put("Total", total);
|
||||||
map.put("StationStatusInfos", collect);
|
map.put("StationStatusInfos", collect);
|
||||||
|
|
||||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, configInfo);
|
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,6 +475,7 @@ public class NeiMengGuPlatformServiceImpl 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);
|
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());
|
configInfo.getDataSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||||
String dataStr = new String(plainText, StandardCharsets.UTF_8);
|
String dataStr = new String(plainText, StandardCharsets.UTF_8);
|
||||||
|
|||||||
Reference in New Issue
Block a user