mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-26 10:09:52 +08:00
update羽信主板预约充电
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ public class YuxinReservationChargingDTO {
|
||||
*/
|
||||
private String reservedId;
|
||||
|
||||
/**
|
||||
* 状态 (0-停用;1-启用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 充电桩编号
|
||||
*/
|
||||
|
||||
@@ -14,4 +14,6 @@ public interface YuxinReservationChargingService {
|
||||
void deleteReservation(YuxinReservationChargingDTO dto);
|
||||
|
||||
PileReservationInfoVO queryReservationInfo(YuxinReservationChargingDTO dto);
|
||||
|
||||
void updateReservedStatus(YuxinReservationChargingDTO dto);
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user