From ce3b68cce4b030e222448044adf7325d0c897376 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 13 二月 2025 14:02:00 +0800 Subject: [PATCH] 优化功能 --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java index f086096..06eda65 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java @@ -158,6 +158,19 @@ } + /** + * 获取所有停车场数据 + */ + @PostMapping(value = "/getAllParkingLot") + public R<List<TParkingLot>> getAllParkingLot(){ + List<TParkingLot> list = parkingLotService.list(new LambdaQueryWrapper<TParkingLot>() + .eq(TParkingLot::getDelFlag, 0)); + return R.fail(list); + } + + + + @RequiresPermissions(value = {"/paymentOrder/order"}, logical = Logical.OR) @GetMapping(value = "/getRecordById") public R<TParkingRecord> getRecordById(@RequestParam("id") Long id){ @@ -184,5 +197,11 @@ .eq(TParkingLot::getAppKey, appKey).eq(TParkingLot::getDelFlag, 0)); return R.ok(parkingLot); } + @PostMapping(value = "/getSiteIdByOrderId") + R<Integer> getSiteIdByOrderId(@RequestParam("id") Long id){ + TParkingRecord byId = parkingRecordService.getById(id); + TParkingLot parkingLot = parkingLotService.getById(byId.getParkingLotId()); + return R.ok(parkingLot.getId()); + } } -- Gitblit v1.7.1