update 电单车协议

This commit is contained in:
Guoqs
2024-09-05 09:58:21 +08:00
parent 2a6daa56df
commit b341862071
9 changed files with 107 additions and 21 deletions

View File

@@ -14,6 +14,7 @@ import com.jsowell.pile.domain.AdapayMemberAccount;
import com.jsowell.pile.domain.MemberPlateNumberRelation;
import com.jsowell.pile.domain.OrderBasicInfo;
import com.jsowell.pile.domain.ykcCommond.ReservationChargingCommand;
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.service.*;
import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
@@ -83,7 +84,11 @@ public class TempController extends BaseController {
public RestApiResponse<?> tempStartCharging(@RequestBody QueryOrderDTO dto) {
RestApiResponse<?> response = null;
try {
eBikeSendCommandService.startCharging(dto.getPileSn(), dto.getConnectorCode());
StartChargingCommand command = StartChargingCommand.builder()
.pileSn(dto.getPileSn())
.connectorCode(dto.getConnectorCode())
.build();
eBikeSendCommandService.sendStartChargingCommand(command);
response = new RestApiResponse<>();
} catch (Exception e) {
logger.error("电单车开始充电 error", e);