From 2d338a0e7480330ecb78e6d5471c2f47867b0a80 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 05 九月 2024 17:13:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java
index 78b4ddd..dab0830 100644
--- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java
+++ b/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,30 @@
 
         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 = "/detail")
+    public R<TParkingRecord> detail(Long id) {
+
+      return R.ok(parkingRecordService.getById(id));
+
+    }
+
+    @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();
+
+    }
+
+
+
 }
 

--
Gitblit v1.7.1