From 72fc8d7b03f3dcc9c592767f364f9c3b20e6f1a2 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 09 十月 2024 16:05:45 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingGunController.java | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingGunController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingGunController.java index 446fc59..765d06c 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingGunController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingGunController.java @@ -157,7 +157,7 @@ public void downloadQRCode(@PathVariable Integer id, HttpServletResponse response){ try { TChargingGun chargingGun = chargingGunService.getById(id); - TChargingPile chargingPile = chargingPileService.getById(chargingGun.getId()); + TChargingPile chargingPile = chargingPileService.getById(chargingGun.getChargingPileId()); String code = chargingPile.getCode() + chargingGun.getCode(); String fileName = URLEncoder.encode(code, "UTF-8") + ".jpg"; response.setContentType("application/force-download"); @@ -177,15 +177,15 @@ inputStream.close(); //清楚服务器上的文件 - Process process = null; - try { - process = Runtime.getRuntime().exec("sudo rm -rf " + filePath); - } catch (IOException e) { - throw new RuntimeException(e); - } - if (process != null) { - process.destroy(); - } +// Process process = null; +// try { +// process = Runtime.getRuntime().exec("sudo rm -rf " + filePath); +// } catch (IOException e) { +// throw new RuntimeException(e); +// } +// if (process != null) { +// process.destroy(); +// } }catch (Exception e){ e.printStackTrace(); } -- Gitblit v1.7.1