update 电单车

This commit is contained in:
Guoqs
2024-09-14 15:00:44 +08:00
parent d2e6a09ab7
commit 1d30807687

View File

@@ -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