From 3dd961dbdcee7cde4c42de6ed738563ce30d5bbb Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期二, 26 八月 2025 15:15:23 +0800
Subject: [PATCH] bug修改

---
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java
index a84a23e..c5c9199 100644
--- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java
@@ -18,7 +18,8 @@
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.log.enums.OperatorType;
 import com.ruoyi.common.security.annotation.Logical;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.common.security.service.TokenService;
+import com.ruoyi.system.api.domain.SysUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -48,14 +49,16 @@
 
     private final TChargingPileService chargingPileService;
     private final TChargingGunService chargingGunService;
-	
+    private final TokenService tokenService;
+
 	@Resource
 	private RedisTemplate redisTemplate;
 
     @Autowired
-    public TChargingPileController(TChargingPileService chargingPileService, TChargingGunService chargingGunService) {
+    public TChargingPileController(TChargingPileService chargingPileService, TChargingGunService chargingGunService, TokenService tokenService) {
         this.chargingPileService = chargingPileService;
         this.chargingGunService = chargingGunService;
+        this.tokenService = tokenService;
     }
 
     /**
@@ -100,17 +103,16 @@
 	
 	
 	
-	@RequiresPermissions(value = {"/chargingPile", "/chargingGun"}, logical = Logical.OR)
 	@ResponseBody
 	@GetMapping("/pageChargingPileList")
 	@ApiOperation(value = "获取充电桩列表数据", tags = {"管理后台-充电桩信息"})
 	public AjaxResult<PageInfo<PageChargingPileListDTO>> pageChargingPileList(PageChargingPileList page){
-		PageInfo<PageChargingPileListDTO> list = chargingPileService.pageChargingPileList(page);
+		SysUser sysUser = tokenService.getLoginUser().getSysUser();
+		PageInfo<PageChargingPileListDTO> list = chargingPileService.pageChargingPileList(page,sysUser);
 		return AjaxResult.success(list);
 	}
 	
 	
-	@RequiresPermissions(value = {"/chargingPile/add"}, logical = Logical.OR)
 	@ResponseBody
 	@Log(title = "【充电桩信息】添加充电桩数据", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE)
 	@PostMapping("/addChargingPile")
@@ -120,7 +122,6 @@
 	}
 	
 	
-	@RequiresPermissions(value = {"/chargingPile/select", "/chargingPile/update"}, logical = Logical.OR)
 	@ResponseBody
 	@GetMapping("/getChargingPile/{id}")
 	@ApiOperation(value = "获取充电桩详情数据", tags = {"管理后台-充电桩信息"})
@@ -130,7 +131,6 @@
 	}
 	
 	
-	@RequiresPermissions(value = {"/chargingPile/update"}, logical = Logical.OR)
 	@ResponseBody
 	@Log(title = "【充电桩信息】编辑充电桩数据", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE)
 	@PostMapping("/editChargingPile")
@@ -141,7 +141,6 @@
 	
 	
 	
-	@RequiresPermissions(value = {"/chargingPile/del", "/chargingPile/batch_del"}, logical = Logical.OR)
 	@ResponseBody
 	@DeleteMapping("/delChargingPile")
 	@Log(title = "【充电桩信息】删除充电桩", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE)
@@ -154,7 +153,6 @@
 	}
 	
 	
-	@RequiresPermissions(value = {"/chargingPile/accountingStrategy"}, logical = Logical.OR)
 	@ResponseBody
 	@Log(title = "【充电桩信息】批量设置计费策略", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE)
 	@PostMapping("/batchSetAccountingStrategy")

--
Gitblit v1.7.1