add 联联平台请求停止充电接口

This commit is contained in:
Lemon
2023-04-25 14:03:09 +08:00
parent c584ff91f4
commit ea34f51849
6 changed files with 130 additions and 2 deletions

View File

@@ -5,12 +5,14 @@ import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
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 org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -136,4 +138,26 @@ public class LianLianController extends BaseController {
logger.info("联联平台查询充电状态 result :{}", response);
return response;
}
/**
* 请求停止充电
* @param dto
* @return
*/
@PostMapping("/query_stop_charge")
public RestApiResponse<?> query_stop_charge(@RequestBody QueryStartChargeDTO dto) {
logger.info("联联平台请求停止充电 params :{}", JSONObject.toJSONString(dto));
RestApiResponse<?> response;
try {
QueryStopChargeVO queryStopChargeVO = lianLianService.query_stop_charge(dto);
response = new RestApiResponse<>(queryStopChargeVO);
} catch (Exception e) {
logger.error("联联平台请求停止充电 error", e);
response = new RestApiResponse<>(e);
}
logger.info("联联平台请求停止充电 result :{}", response);
return response;
}
}