mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 20:15:06 +08:00
新增 苏州市平台相关Service、controller
This commit is contained in:
@@ -33,7 +33,7 @@ public class NotificationService {
|
||||
* 充电站信息变化推送
|
||||
* notification_stationInfo
|
||||
*/
|
||||
public void notificationStationInfo(NotificationDTO dto) {
|
||||
public String notificationStationInfo(NotificationDTO dto) {
|
||||
String stationId = dto.getStationId();
|
||||
String platformType = dto.getPlatformType();
|
||||
|
||||
@@ -43,9 +43,10 @@ public class NotificationService {
|
||||
// 通过stationId 查询该站点需要对接的平台配置
|
||||
List<ThirdPartySecretInfoVO> secretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
|
||||
if (CollectionUtils.isEmpty(secretInfoVOS)) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
// 调用相应平台的处理方法
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (ThirdPartySecretInfoVO secretInfoVO : secretInfoVOS) {
|
||||
if (StringUtils.isNotBlank(platformType) && !StringUtils.equals(platformType, secretInfoVO.getPlatformType())) {
|
||||
// 如果dto中的platformType不为空,并且不等于secretInfoVO.getPlatformType(),continue
|
||||
@@ -53,11 +54,13 @@ public class NotificationService {
|
||||
}
|
||||
try {
|
||||
ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType());
|
||||
platformService.notificationStationInfo(stationId);
|
||||
String postResult = platformService.notificationStationInfo(stationId);
|
||||
result.append(postResult).append("\n");
|
||||
} catch (Exception e) {
|
||||
logger.error("充电站信息变化推送error", e);
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user