mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 04:25:21 +08:00
Merge branch 'dev-new' into dev-new-rabbitmq
This commit is contained in:
@@ -649,4 +649,21 @@ public class TempController extends BaseController {
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时接口, 关闭未支付订单
|
||||
* https://localhost:8080/temp/closeUnpaidOrder
|
||||
*/
|
||||
@PostMapping("/closeUnpaidOrder")
|
||||
public RestApiResponse<?> closeUnpaidOrder(@RequestBody QueryOrderDTO dto) {
|
||||
RestApiResponse<?> response;
|
||||
try {
|
||||
tempService.closeUnpaidOrder(dto);
|
||||
response = new RestApiResponse<>();
|
||||
} catch (Exception e) {
|
||||
logger.error("临时接口, 关闭未支付订单error", e);
|
||||
response = new RestApiResponse<>();
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -713,5 +713,16 @@ public class TempService {
|
||||
|
||||
return orderCodeList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭未支付订单
|
||||
*/
|
||||
public void closeUnpaidOrder(QueryOrderDTO dto) {
|
||||
// 查询未支付订单
|
||||
List<OrderBasicInfo> unpaidOrderList = orderBasicInfoService.getUnpaidOrderList(dto.getStartTime(), dto.getEndTime());
|
||||
logger.info("closeUnpaidOrders, startTime:{}, endTime:{}, 未支付订单:{}", dto.getStartTime(), dto.getEndTime(), JSON.toJSONString(unpaidOrderList));
|
||||
// 关闭未支付订单
|
||||
orderBasicInfoService.closeUnpaidOrders(unpaidOrderList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class PileRemoteController extends BaseController {
|
||||
if (StringUtils.isBlank(dto.getPileSn()) || StringUtils.isBlank(dto.getConnectorCode())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
pileRemoteService.remoteStopCharging(dto.getPileSn(), dto.getConnectorCode(), null);
|
||||
pileRemoteService.remoteStopCharging(dto.getPileSn(), dto.getConnectorCode(), dto.getTransactionCode());
|
||||
ajaxResult = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
ajaxResult = AjaxResult.error(e.getCode(), e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user