add 联联平台 请求启动充电 接口

This commit is contained in:
Lemon
2023-04-29 10:33:16 +08:00
parent b5f1d93359
commit 6c5c72034c
7 changed files with 192 additions and 17 deletions

View File

@@ -3,16 +3,14 @@ package com.jsowell.lianlian;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.QueryEquipmentDTO;
import com.jsowell.pile.dto.QueryStartChargeDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.thirdparty.domain.StationStatsInfo;
import com.jsowell.thirdparty.service.LianLianService;
import com.jsowell.thirdparty.vo.EquipmentAuthVO;
import com.jsowell.thirdparty.vo.LianLianPageResponse;
import com.jsowell.thirdparty.vo.QueryChargingStatusVO;
import com.jsowell.thirdparty.vo.QueryStopChargeVO;
import com.jsowell.thirdparty.vo.*;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -118,6 +116,28 @@ public class LianLianController extends BaseController {
return response;
}
/**
* 请求启动充电
* @param dto
* @return
*/
@PostMapping("/query_start_charge")
public RestApiResponse<?> query_start_charge(@RequestBody QueryStartChargeDTO dto) {
logger.info("联联平台请求启动充电 params :{}", JSONObject.toJSONString(dto));
RestApiResponse<?> response;
try {
QueryStartChargeVO queryStartChargeVO = lianLianService.query_start_charge(dto);
response = new RestApiResponse<>(queryStartChargeVO);
}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;
}
/**
* 查询充电状态