Ver código fonte

越权问题修复

raojiang 4 meses atrás
pai
commit
ab496dc2a6

+ 2 - 4
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/aspect/CountryPermissionAspect.java

@@ -54,7 +54,7 @@ public class CountryPermissionAspect {
         List<Long> deptList = this.getDeptList();
         String countryFields = requiresCountryPermissions.countryFields();
         String lineFields = requiresCountryPermissions.lineFields();
-        String deptCodeFields = requiresCountryPermissions.lineFields();
+        String deptCodeFields = requiresCountryPermissions.deptCodeFields();
 
         String lineId = "";
         String countryId = "";
@@ -92,11 +92,9 @@ public class CountryPermissionAspect {
         if (StringUtils.isNotEmpty(feederCountryId) && !countyList.contains(feederCountryId)) {
             throw new BusinessException("当前用户无权限访问");
         }
-        if (deptId != -1L && !deptList.contains(deptId)) {
+        if (deptId != null && deptId != -1L && !deptList.contains(deptId)) {
             throw new BusinessException("当前用户无权限访问");
         }
-
-
     }
 
     //查询登录人的所有机构区县信息

+ 0 - 1
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/controller/FhzgFaultPowerCutController.java

@@ -50,7 +50,6 @@ public class FhzgFaultPowerCutController extends BaseController {
      */
     @PostMapping("/getSchemeList")
     @ApiOperation(value = "获取故障停电方案列表")
-    @RequiresCountryPermissions(deptCodeFields = "countyCode")
     public ApiResponse<Page<FhzgFaultPowerCutVO>> getSchemeList(@RequestBody FaultPowerCut faultPowerCut) {
         return ApiResponse.success(faultPowerCutService.getSchemeList(faultPowerCut));
     }

+ 0 - 2
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/controller/FhzgOperationAbnormalityController.java

@@ -47,14 +47,12 @@ public class FhzgOperationAbnormalityController extends BaseController {
      */
     @PostMapping("/getOperationAbnormalityList")
     @ApiOperation(value = "获取运行异常转供列表")
-    @RequiresCountryPermissions(deptCodeFields = "countyCode")
     public ApiResponse<Page<FhzgGridOperationAbnormalityVO>> getOperationAbnormalityList(@ApiParam("查看运行异常转供dto") @RequestBody FhzgGridOperationAbnormalityDTO queryDTO) {
         return ApiResponse.success(fhzgOperationAbnormalityService.getOperationAbnormalityList(queryDTO));
     }
 
     @PostMapping("/getAllOperationAbnormalityList")
     @ApiOperation(value = "获取运行异常转供列表(含成片电压越限)")
-    @RequiresCountryPermissions(deptCodeFields = "countyCode")
     public ApiResponse<Page<FhzgAbnormalityWithVolVO>> getOperationAbnormalityListNew(@ApiParam("查看运行异常转供dto") @RequestBody FhzgGridOperationAbnormalityDTO queryDTO) {
         return ApiResponse.success(fhzgOperationAbnormalityService.getOperationAbnormalityListNew(queryDTO));
     }

+ 0 - 1
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/controller/FhzgPlanPowerCutController.java

@@ -48,7 +48,6 @@ public class FhzgPlanPowerCutController extends BaseController {
      */
     @PostMapping("/getSchemeList")
     @ApiOperation(value = "获取计划停电方案列表")
-    @RequiresCountryPermissions(deptCodeFields = "countyCode")
     public ApiResponse<Page<FhzgPlanPowerCutVO>> getSchemeList(@RequestBody FhzgPlanPowerCut planPowerCut) {
         return ApiResponse.success(planPowerCutService.getSchemeList(planPowerCut));
     }

+ 0 - 1
services/load-transfer-bf/src/main/java/com/hdkj/lt/bf/controller/WholeStationPowerCutTempController.java

@@ -37,7 +37,6 @@ public class WholeStationPowerCutTempController {
      **/
     @PostMapping("/page-list")
     @ApiOperation(value = "故障获取保护定值推荐列表")
-    @RequiresCountryPermissions(deptCodeFields = "countyCode")
     public ApiResponse<PageVO<WholeStationPowerCutVO>> pageList(@RequestBody WholeStationPowerCutReqDTO reqDTO) {
         PageVO<WholeStationPowerCutVO> result = fhzgWholeStationPowerCutTempService.pageList(reqDTO);
         return ApiResponse.success(result);