update 推送逻辑

This commit is contained in:
Guoqs
2024-05-10 17:15:47 +08:00
parent 6cecaf50e2
commit 63a65b4e72
2 changed files with 49 additions and 24 deletions

View File

@@ -392,6 +392,9 @@ public class CommonService {
// 查询订单信息
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
if (Objects.isNull(orderInfo)) {
return;
}
// 推送
for (ThirdPartySecretInfoVO thirdPartySecretInfoVO : thirdPartySecretInfoVOS) {
@@ -400,9 +403,7 @@ public class CommonService {
dto.setPileConnectorCode(pileConnectorCode);
dto.setStatus(changedStatus);
dto.setPlatformType(thirdPartySecretInfoVO.getPlatformType());
if (Objects.nonNull(orderInfo)) {
dto.setOrderCode(orderInfo.getOrderCode());
}
dto.setOrderCode(orderInfo.getOrderCode());
notificationService.notificationConnectorChargeStatus(dto);
}
@@ -483,6 +484,23 @@ public class CommonService {
}
}
public void commonPushOrderInfoV2(OrderBasicInfo orderBasicInfo) {
String stationId = orderBasicInfo.getStationId();
// 查询该站点是否推送第三方平台
List<ThirdPartySecretInfoVO> relationInfoList = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
// ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
if (CollectionUtils.isEmpty(relationInfoList)) {
return;
}
for (ThirdPartySecretInfoVO relationVO : relationInfoList) {
NotificationDTO dto = new NotificationDTO();
dto.setStationId(stationId);
dto.setPlatformType(relationVO.getPlatformType());
dto.setOrderCode(orderBasicInfo.getOrderCode());
notificationService.notificationChargeOrderInfo(dto);
}
}
/**
* 统一推送启动充电结果