From 1d308076879f8cc39beeb4cf330c0026e70b0dbe Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Sat, 14 Sep 2024 15:00:44 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=94=B5=E5=8D=95=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/uniapp/customer/TempController.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/TempController.java b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/TempController.java index 0365c1165..baa03c607 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/TempController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/TempController.java @@ -97,6 +97,28 @@ public class TempController extends BaseController { return response; } + /** + * 电单车结束充电 + * http://localhost:8080/temp/tempStopCharging + */ + @PostMapping("/tempStopCharging") + public RestApiResponse tempStopCharging(@RequestBody QueryOrderDTO dto) { + RestApiResponse response = null; + try { + StartChargingCommand command = StartChargingCommand.builder() + .pileSn(dto.getPileSn()) + .connectorCode(dto.getConnectorCode()) + .transactionCode(dto.getTransactionCode()) + .build(); + eBikeSendCommandService.sendStartChargingCommand(command); + response = new RestApiResponse<>(); + } catch (Exception e) { + logger.error("电单车结束充电 error", e); + response = new RestApiResponse<>(ReturnCodeEnum.CODE_FAILED); + } + return response; + } + /** * 对时 * http://localhost:8080/temp/proofreadTimeTest