update 联联平台service

This commit is contained in:
Lemon
2025-03-05 16:09:44 +08:00
parent db2b9155be
commit eb2b13a7f4
2 changed files with 13 additions and 23 deletions

View File

@@ -183,21 +183,13 @@ public class JiangSuPlatformServiceImpl implements ThirdPartyPlatformService {
data.put("StationInfo", nrStationInfo); data.put("StationInfo", nrStationInfo);
String jsonString = data.toString(); String jsonString = data.toString();
System.out.println("jsonString : " + jsonString); // System.out.println("jsonString : " + jsonString);
// 获取令牌 // 获取令牌
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret); String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
System.out.println(token);
String result = HttpRequestUtil.nrSendPost(token, jsonString, url, dataSecret String result = HttpRequestUtil.nrSendPost(token, jsonString, url, dataSecret
, dataSecretIv, operatorId, signSecret); , dataSecretIv, operatorId, signSecret);
return result;
// 新增数据库
PushStationInfoDTO dto = new PushStationInfoDTO();
dto.setThirdPartyType(thirdPlatformType);
dto.setStationId(Long.parseLong(stationId));
commonService.insertInfo2DataBase(dto);
return thirdPlatformType + "" + result;
} }

View File

@@ -541,8 +541,9 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
, dataSecretIv, operatorId, signSecret); , dataSecretIv, operatorId, signSecret);
// 新增数据库 // 新增数据库
thirdPartyStationRelationService.insertInfo2DataBase(thirdPlatformType, stationId); // thirdPartyStationRelationService.insertInfo2DataBase(thirdPlatformType, stationId);
return thirdPlatformType + "" + result; // return thirdPlatformType + "" + result;
return result;
} }
/** /**
@@ -618,17 +619,14 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
.totalMoney(new BigDecimal(realTimeMonitorData.getChargingAmount()).setScale(2, BigDecimal.ROUND_HALF_UP)) .totalMoney(new BigDecimal(realTimeMonitorData.getChargingAmount()).setScale(2, BigDecimal.ROUND_HALF_UP))
.build(); .build();
// 通过站点id查询相关配置信息 ThirdPartySecretInfoVO thirdPartySecretInfoVO = getLianLianPlatformSecretInfo();
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(orderInfo.getStationId());
if (relationInfo == null) { String operatorId = thirdPartySecretInfoVO.getTheirOperatorId();
return null; String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret();
} String signSecret = thirdPartySecretInfoVO.getTheirSigSecret();
String operatorId = relationInfo.getOperatorId(); String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret();
String operatorSecret = relationInfo.getOperatorSecret(); String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv();
String signSecret = relationInfo.getSignSecret(); String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix();
String dataSecret = relationInfo.getDataSecret();
String dataSecretIv = relationInfo.getDataSecretIv();
String urlAddress = relationInfo.getUrlAddress();
String url = urlAddress + "notification_connector_charge_status"; String url = urlAddress + "notification_connector_charge_status";