Commit f141050ace7b930138801b5dd73b383105ee9588

Authored by xp.Huang
1 parent 3a6aca85

perf: 只需要角色权限控制的统一使用hasAnyAuthority

... ... @@ -397,7 +397,7 @@ public class TkDeviceController extends BaseController {
397 397 }
398 398
399 399 @GetMapping("/list")
400   - @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})")
  400 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN','CUSTOMER_USER')")
401 401 @ApiOperation("获取满足条件的所有设备")
402 402 public List<DeviceDTO> getDevices(
403 403 @ApiParam(value = "设备类型") @RequestParam(value = "deviceType", required = false)
... ... @@ -421,7 +421,7 @@ public class TkDeviceController extends BaseController {
421 421
422 422
423 423 @PostMapping("/getListByDeviceProfileIds")
424   - @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})")
  424 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN','CUSTOMER_USER')")
425 425 @ApiOperation("获取多种产品下的设备")
426 426 public List<DeviceDTO> getListByDeviceProfileIds(
427 427 @RequestBody (required = false)List<String> deviceProfileIds,
... ... @@ -437,7 +437,7 @@ public class TkDeviceController extends BaseController {
437 437 }
438 438
439 439 @GetMapping("/gateway/list")
440   - @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})")
  440 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN','CUSTOMER_USER')")
441 441 @ApiOperation("获取满足条件的所有设备")
442 442 public List<DeviceDTO> getGatewayDevices(
443 443 @ApiParam(value = "组织ID")
... ... @@ -454,7 +454,7 @@ public class TkDeviceController extends BaseController {
454 454 }
455 455
456 456 @GetMapping("/list/master/{organizationId}")
457   - @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})")
  457 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN','CUSTOMER_USER')")
458 458 @ApiOperation("主设备列表")
459 459 public List<SelectItemDTO> getMasterDevices(
460 460 @ApiParam(value = "组织ID") @PathVariable("organizationId") String organizationId,
... ... @@ -469,7 +469,7 @@ public class TkDeviceController extends BaseController {
469 469 }
470 470
471 471 @GetMapping("/list/slave/{organizationId}")
472   - @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})")
  472 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN','CUSTOMER_USER')")
473 473 @ApiOperation("从设备列表")
474 474 public List<SelectItemDTO> getSlaveDevices(
475 475 @ApiParam(value = "组织ID") @PathVariable("organizationId") String organizationId,
... ... @@ -484,7 +484,7 @@ public class TkDeviceController extends BaseController {
484 484 }
485 485
486 486 @GetMapping("/keys/{organizationId}")
487   - @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})")
  487 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN','CUSTOMER_USER')")
488 488 @ApiOperation("设备遥测指标名称")
489 489 public List<String> listKeys(
490 490 @ApiParam(value = "组织ID") @PathVariable("organizationId") String organizationId,
... ...