lzh 317f1cd02f perf(system): isSuperAdmin 切到 getUserRoleIdListByUserIdFromCache
修复 /admin-api/system/auth/get-permission-info 等接口大面积超时:

原因:ProjectSecurityWebFilter 每次 admin-api 请求都调一次
ProjectService.getAuthorizedProjectIds(userId),我之前在里面塞的
isSuperAdmin 用了无缓存的 getUserRoleIdListByUserId,
每请求一次 SELECT system_user_role,并发下直接打爆 DB。

切到 getUserRoleIdListByUserIdFromCache(@Cacheable 走 Redis
USER_ROLE_ID_LIST),首次查 DB、后续命中缓存,该缓存在
assignUserRole / processUserDeleted / updateUserRole 等写入点
都已正确 CacheEvict。

同时修正 UserProjectServiceImpl.isSuperAdmin 同样问题。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 16:10:41 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2026-04-16 15:28:49 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
Description
aiot后端(微服务版)
MIT 20 MiB
Languages
Java 80.2%
PLpgSQL 12.7%
TSQL 6.7%
Python 0.2%