update 电单车协议

This commit is contained in:
Guoqs
2024-09-18 16:44:24 +08:00
parent 502488166c
commit c0e981cdb8
12 changed files with 88 additions and 41 deletions

View File

@@ -13,8 +13,8 @@ import com.jsowell.common.util.DateUtils;
import com.jsowell.pile.domain.AdapayMemberAccount;
import com.jsowell.pile.domain.MemberPlateNumberRelation;
import com.jsowell.pile.domain.OrderBasicInfo;
import com.jsowell.pile.domain.ykcCommond.EBikeStartChargingCommand;
import com.jsowell.pile.domain.ykcCommond.ReservationChargingCommand;
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
import com.jsowell.pile.domain.ykcCommond.StopChargingCommand;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.service.*;
@@ -85,11 +85,11 @@ public class TempController extends BaseController {
public RestApiResponse<?> tempStartCharging(@RequestBody QueryOrderDTO dto) {
RestApiResponse<?> response = null;
try {
StartChargingCommand command = StartChargingCommand.builder()
.pileSn(dto.getPileSn())
.connectorCode(dto.getConnectorCode())
.chargeAmount(new BigDecimal("1"))
.build();
EBikeStartChargingCommand command = new EBikeStartChargingCommand();
command.setPileSn(dto.getPileSn());
command.setConnectorCode(dto.getConnectorCode());
command.setChargeAmount(new BigDecimal("1"));
eBikeSendCommandService.sendStartChargingCommand(command);
response = new RestApiResponse<>();
} catch (Exception e) {