mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
新增新电途推送接口
This commit is contained in:
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.*;
|
||||
@@ -54,32 +55,30 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送充电站信息 notification_stationInfo
|
||||
* http://localhost:8080/xindiantu/v1/pushStationInfo
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
// @PostMapping("/pushStationInfo")
|
||||
// public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
|
||||
// logger.info("推送新电途平台充电站信息 params:{}", JSON.toJSONString(dto));
|
||||
// RestApiResponse<?> response = null;
|
||||
// try {
|
||||
// if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
|
||||
// throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
// }
|
||||
// xdtService.pushStationInfo(dto);
|
||||
// response = new RestApiResponse<>();
|
||||
// }catch (BusinessException e) {
|
||||
// logger.error("推送新电途平台充电站信息 error",e);
|
||||
// response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
// }catch (Exception e) {
|
||||
// logger.error("推送新电途平台充电站信息 error", e);
|
||||
// response = new RestApiResponse<>(e);
|
||||
// }
|
||||
// logger.info("推送新电途平台充电站信息 result:{}", response);
|
||||
// return response;
|
||||
// }
|
||||
@PostMapping("/v1/notification_station_detail")
|
||||
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
|
||||
logger.info("推送新电途平台充电站信息 params:{}", JSON.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
platformLogic.notificationStationInfo(String.valueOf(dto.getStationId()));
|
||||
response = new RestApiResponse<>();
|
||||
}catch (BusinessException e) {
|
||||
logger.error("推送新电途平台充电站信息 error",e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
}catch (Exception e) {
|
||||
logger.error("推送新电途平台充电站信息 error", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("推送新电途平台充电站信息 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电站信息
|
||||
@@ -487,5 +486,5 @@ public class XDTController extends ThirdPartyBaseController {
|
||||
// logger.info("新电途平台设备状态变化推送 result:{}", response);
|
||||
// return response;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user