zhangnaisong
2024-07-02 9710740f1672fcaab74510ff5e8044c5fd0dafc8
ard-work/src/main/java/com/ruoyi/sy/controller/ArdTankLockController.java
@@ -131,13 +131,34 @@
        return toAjax(ardTankLockService.deleteArdTankLockById(id));
    }
    @ApiOperation("查询全部电磁锁")
    /*@ApiOperation("查询全部电磁锁")
    @PreAuthorize("@ss.hasPermi('sy:lock:getAll')")
    @GetMapping("/getAll")
    public Results getAll() {
        String userId = SecurityUtils.getUserId();
        Results result = ardTankLockService.getAll(userId);
        return result;
    }*/
    @ApiOperation("查询全部电磁锁")
    @PreAuthorize("@ss.hasPermi('sy:lock:getAll')")
    @GetMapping("/getAll")
    public TableDataInfo getAll() {
        startPage();
        String userId = SecurityUtils.getUserId();
        List<Map<String,Object>> result = ardTankLockService.getAll(userId);
        return getDataTable(result);
    }
    /**
     * 根据car_id获取电磁锁详细信息
     */
    @ApiOperation("根据car_id获取电磁锁详细信息")
    @PreAuthorize("@ss.hasPermi('sy:lock:getLockByCarId')")
    @PostMapping("/getLockByCarId")
    public AjaxResult getLockByCarId(@RequestBody ArdTankLock ardTankLock) {
        String userId = SecurityUtils.getUserId();
        return success(ardTankLockService.getLockByCarId(ardTankLock.getCarId(),userId));
    }
    /**