update 电单车协议

This commit is contained in:
Guoqs
2024-09-02 19:55:02 +08:00
parent a41264d1b9
commit 256e358be5
16 changed files with 245 additions and 115 deletions

View File

@@ -72,6 +72,25 @@ public class TempController extends BaseController {
@Autowired
private PileRemoteService pileRemoteService;
@Autowired
private EBikeSendCommandService eBikeSendCommandService;
/**
* 电单车开始充电
* http://localhost:8080/temp/tempStartCharging
*/
@PostMapping("/tempStartCharging")
public RestApiResponse<?> tempStartCharging(@RequestBody QueryOrderDTO dto) {
RestApiResponse<?> response = null;
try {
eBikeSendCommandService.startCharging(dto.getPileSn());
} catch (Exception e) {
logger.error("电单车开始充电 error", e);
response = new RestApiResponse<>(ReturnCodeEnum.CODE_FAILED);
}
return response;
}
/**
* 对时
* http://localhost:8080/temp/proofreadTimeTest