Pu Zhibing
2025-02-13 ce3b68cce4b030e222448044adf7325d0c897376
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());
    }
}