luodangjia
2024-08-31 67aa40955df674f33fbf5972c738ee1bfd50d2b0
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java
@@ -31,7 +31,7 @@
    private TParkingLotService parkingLotService;
    @ApiOperation(tags = {"后台-订单管理-停车记录"},value = "列表")
    @GetMapping(value = "/page")
    @PostMapping(value = "/page")
    public R<Page<TParkingRecord>> page(@RequestBody ParkingRecordPageQuery query) {
        Page<TParkingRecord> page = parkingRecordService.lambdaQuery().ge(query.getStart() != null, TParkingRecord::getCreateTime, query.getStart())
                .le(query.getEnd() != null, TParkingRecord::getCreateTime, query.getEnd())
@@ -42,9 +42,22 @@
        for (TParkingRecord record : page.getRecords()) {
            record.setName(parkingLotService.getById(record.getParkingLotId()).getName());
            record.setUid(record.getId().toString());
        }
        return R.ok(page);
    }
    @ApiOperation(tags = {"后台-订单管理-停车记录"},value = "出场")
    @GetMapping(value = "/out")
    public R out(Long id) {
        TParkingRecord byId = parkingRecordService.getById(id);
        byId.setStatus(2);
        parkingRecordService.updateById(byId);
        return R.ok();
    }
}