update羽信主板预约充电

This commit is contained in:
jsowell
2026-06-25 16:14:08 +08:00
parent 838e37ed03
commit b77ad0d686
4 changed files with 19 additions and 7 deletions

View File

@@ -563,25 +563,25 @@ public class PersonPileController extends BaseController {
}
/**
* 羽信主板取消预约充电
* http://localhost:8080/uniapp/personalPile/yuxin/cancelReservation
* 羽信主板修改预约充电状态
* http://localhost:8080/uniapp/personalPile/yuxin/updateReservedStatus
*/
@PostMapping("/yuxin/cancelReservation")
@PostMapping("/yuxin/updateReservedStatus")
public RestApiResponse<?> cancelYuxinReservation(HttpServletRequest request, @RequestBody YuxinReservationChargingDTO dto) {
RestApiResponse<?> response = null;
try {
String memberId = getMemberIdByAuthorization(request);
dto.setMemberId(memberId);
yuxinReservationChargingService.cancelReservation(dto);
yuxinReservationChargingService.updateReservedStatus(dto);
response = new RestApiResponse<>();
} catch (BusinessException e) {
logger.error("羽信取消预约充电error, params:{}", dto, e);
logger.error("羽信修改预约充电状态error, params:{}", dto, e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("羽信取消预约充电error, params:{}", dto, e);
logger.error("羽信修改预约充电状态error, params:{}", dto, e);
response = new RestApiResponse<>(ReturnCodeEnum.CODE_UPDATE_RESERVED_STATUS_ERROR);
}
logger.info("羽信取消预约充电params:{}, result:{}", dto, response);
logger.info("羽信修改预约充电状态params:{}, result:{}", dto, response);
return response;
}

View File

@@ -23,6 +23,11 @@ public class YuxinReservationChargingDTO {
*/
private String reservedId;
/**
* 状态 0-停用1-启用)
*/
private String status;
/**
* 充电桩编号
*/

View File

@@ -14,4 +14,6 @@ public interface YuxinReservationChargingService {
void deleteReservation(YuxinReservationChargingDTO dto);
PileReservationInfoVO queryReservationInfo(YuxinReservationChargingDTO dto);
void updateReservedStatus(YuxinReservationChargingDTO dto);
}

View File

@@ -181,6 +181,11 @@ public class YuxinReservationChargingServiceImpl implements YuxinReservationChar
.build();
}
@Override
public void updateReservedStatus(YuxinReservationChargingDTO dto) {
}
private void fillReservationInfo(PileReservationInfo reservationInfo, YuxinReservationChargingDTO dto) {
reservationInfo.setMemberId(dto.getMemberId());
reservationInfo.setPileSn(dto.getPileSn());