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) { public RestApiResponse<?> cancelYuxinReservation(HttpServletRequest request, @RequestBody YuxinReservationChargingDTO dto) {
RestApiResponse<?> response = null; RestApiResponse<?> response = null;
try { try {
String memberId = getMemberIdByAuthorization(request); String memberId = getMemberIdByAuthorization(request);
dto.setMemberId(memberId); dto.setMemberId(memberId);
yuxinReservationChargingService.cancelReservation(dto); yuxinReservationChargingService.updateReservedStatus(dto);
response = new RestApiResponse<>(); response = new RestApiResponse<>();
} catch (BusinessException e) { } catch (BusinessException e) {
logger.error("羽信取消预约充电error, params:{}", dto, e); logger.error("羽信修改预约充电状态error, params:{}", dto, e);
response = new RestApiResponse<>(e.getCode(), e.getMessage()); response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) { } catch (Exception e) {
logger.error("羽信取消预约充电error, params:{}", dto, e); logger.error("羽信修改预约充电状态error, params:{}", dto, e);
response = new RestApiResponse<>(ReturnCodeEnum.CODE_UPDATE_RESERVED_STATUS_ERROR); response = new RestApiResponse<>(ReturnCodeEnum.CODE_UPDATE_RESERVED_STATUS_ERROR);
} }
logger.info("羽信取消预约充电params:{}, result:{}", dto, response); logger.info("羽信修改预约充电状态params:{}, result:{}", dto, response);
return response; return response;
} }

View File

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

View File

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

View File

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