From 1affeef32cf30a1765ee749db0344258058b4e2e Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期四, 24 七月 2025 16:24:21 +0800 Subject: [PATCH] 大屏替换路径 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java index 56faece..a13432a 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java @@ -81,8 +81,8 @@ @PostMapping(value = "/getGreenElectricity") @ResponseBody - public R<BigDecimal> getGreenElectricity(@RequestBody List<Integer> siteIds){ - BigDecimal greenElectricity = screenContentMapper.getGreenElectricity(siteIds); + public R<BigDecimal> getGreenElectricity(){ + BigDecimal greenElectricity = screenContentMapper.getGreenElectricity(Arrays.asList(26,25)); return R.ok(greenElectricity); } @@ -102,4 +102,17 @@ HashMap<String, Object> carportData = screenContentMapper.getCarportData(); return R.ok(carportData); } + @GetMapping(value = "/reset") + @ResponseBody + public void reset(@RequestParam("electricity") String electricity){ + TSystemConfiguration sysConfig = tSystemConfigurationService.getOne(new LambdaQueryWrapper<TSystemConfiguration>() + .eq(TSystemConfiguration::getType,5)); + sysConfig.setContent(electricity.split("_")[0]); + tSystemConfigurationService.updateById(sysConfig); + + TSystemConfiguration sysConfig1 = tSystemConfigurationService.getOne(new LambdaQueryWrapper<TSystemConfiguration>() + .eq(TSystemConfiguration::getType,4)); + sysConfig1.setContent(electricity.split("_")[1]); + tSystemConfigurationService.updateById(sysConfig1); + } } -- Gitblit v1.7.1