update 推送第三方平台可多选

This commit is contained in:
Lemon
2024-01-19 11:01:42 +08:00
parent d8c20dde40
commit 4162c37e6e
3 changed files with 177 additions and 161 deletions

View File

@@ -299,40 +299,44 @@ public class PileStationInfoController extends BaseController {
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
logger.info("推送第三方平台充电站信息 params:{}", JSONObject.toJSONString(dto));
RestApiResponse<?> response = null;
List<String> types = dto.getThirdPartyTypes();
try {
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
String result = "";
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
// 推送联联
// result = lianLianService.pushStationInfo(dto);
result = lianLianService.pushStationInfoV2(dto);
for (String type : types) {
dto.setThirdPartyType(type);
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
// 推送联联
// result = lianLianService.pushStationInfo(dto);
result = lianLianService.pushStationInfoV2(dto);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
// 中电联
// result = zdlService.pushStationInfo(dto);
result = zdlService.pushStationInfoV2(dto);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getCode(), dto.getThirdPartyType())) {
// 江苏省平台
// result = nrService.pushStationInfo(dto);
result = nrService.pushStationInfoV2(dto);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), dto.getThirdPartyType())) {
// 甬城泊车平台
// result = ycbcService.pushStationInfo(dto);
result = ycbcService.pushStationInfoV2(dto);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), dto.getThirdPartyType())) {
// 新电途平台
xdtService.pushStationInfo(dto);
}
// if(StringUtils.equals(ThirdPlatformTypeEnum.HUA_WEI.getCode(), dto.getThirdPartyType())) {
// // 华为
// result = huaWeiService.notificationOperationSystemInfo(dto);
// }
response = new RestApiResponse<>(result);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
// 中电联
// result = zdlService.pushStationInfo(dto);
result = zdlService.pushStationInfoV2(dto);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getCode(), dto.getThirdPartyType())) {
// 江苏省平台
// result = nrService.pushStationInfo(dto);
result = nrService.pushStationInfoV2(dto);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), dto.getThirdPartyType())) {
// 甬城泊车平台
// result = ycbcService.pushStationInfo(dto);
result = ycbcService.pushStationInfoV2(dto);
}
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), dto.getThirdPartyType())) {
// 新电途平台
xdtService.pushStationInfo(dto);
}
// if(StringUtils.equals(ThirdPlatformTypeEnum.HUA_WEI.getCode(), dto.getThirdPartyType())) {
// // 华为
// result = huaWeiService.notificationOperationSystemInfo(dto);
// }
response = new RestApiResponse<>(result);
}catch (BusinessException e) {
logger.error("推送第三方平台充电站信息 error",e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());