| | |
| | | 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()) |
| | |
| | | |
| | | 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(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |