update 对接第三方平台

This commit is contained in:
2024-03-23 08:46:46 +08:00
parent 9e358f010f
commit bda2919bcd
7 changed files with 448 additions and 267 deletions

View File

@@ -43,26 +43,26 @@ public class LianLianController extends BaseController {
* @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);
}
lianLianService.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("/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);
// }
// lianLianService.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;
// }
/**