ai-engineering-init 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/.claude/hooks/skill-forced-eval.js +46 -62
  2. package/.claude/settings.json +10 -1
  3. package/.claude/skills/api-development/SKILL.md +179 -130
  4. package/.claude/skills/architecture-design/SKILL.md +102 -212
  5. package/.claude/skills/backend-annotations/SKILL.md +166 -220
  6. package/.claude/skills/bug-detective/SKILL.md +225 -186
  7. package/.claude/skills/code-patterns/SKILL.md +127 -244
  8. package/.claude/skills/collaborating-with-codex/SKILL.md +96 -113
  9. package/.claude/skills/crud-development/SKILL.md +226 -307
  10. package/.claude/skills/data-permission/SKILL.md +131 -202
  11. package/.claude/skills/database-ops/SKILL.md +158 -355
  12. package/.claude/skills/error-handler/SKILL.md +224 -285
  13. package/.claude/skills/file-oss-management/SKILL.md +174 -169
  14. package/.claude/skills/git-workflow/SKILL.md +123 -341
  15. package/.claude/skills/json-serialization/SKILL.md +121 -137
  16. package/.claude/skills/performance-doctor/SKILL.md +83 -89
  17. package/.claude/skills/redis-cache/SKILL.md +134 -185
  18. package/.claude/skills/scheduled-jobs/SKILL.md +187 -224
  19. package/.claude/skills/security-guard/SKILL.md +168 -276
  20. package/.claude/skills/sms-mail/SKILL.md +266 -228
  21. package/.claude/skills/social-login/SKILL.md +257 -195
  22. package/.claude/skills/tenant-management/SKILL.md +172 -188
  23. package/.claude/skills/utils-toolkit/SKILL.md +214 -222
  24. package/.claude/skills/websocket-sse/SKILL.md +251 -172
  25. package/.claude/skills/workflow-engine/SKILL.md +178 -250
  26. package/.codex/skills/api-development/SKILL.md +179 -130
  27. package/.codex/skills/architecture-design/SKILL.md +102 -212
  28. package/.codex/skills/backend-annotations/SKILL.md +166 -220
  29. package/.codex/skills/bug-detective/SKILL.md +225 -186
  30. package/.codex/skills/code-patterns/SKILL.md +127 -244
  31. package/.codex/skills/collaborating-with-codex/SKILL.md +96 -113
  32. package/.codex/skills/crud-development/SKILL.md +226 -307
  33. package/.codex/skills/data-permission/SKILL.md +131 -202
  34. package/.codex/skills/database-ops/SKILL.md +158 -355
  35. package/.codex/skills/error-handler/SKILL.md +224 -285
  36. package/.codex/skills/file-oss-management/SKILL.md +174 -169
  37. package/.codex/skills/git-workflow/SKILL.md +123 -341
  38. package/.codex/skills/json-serialization/SKILL.md +121 -137
  39. package/.codex/skills/performance-doctor/SKILL.md +83 -89
  40. package/.codex/skills/redis-cache/SKILL.md +134 -185
  41. package/.codex/skills/scheduled-jobs/SKILL.md +187 -224
  42. package/.codex/skills/security-guard/SKILL.md +168 -276
  43. package/.codex/skills/sms-mail/SKILL.md +266 -228
  44. package/.codex/skills/social-login/SKILL.md +257 -195
  45. package/.codex/skills/tenant-management/SKILL.md +172 -188
  46. package/.codex/skills/utils-toolkit/SKILL.md +214 -222
  47. package/.codex/skills/websocket-sse/SKILL.md +251 -172
  48. package/.codex/skills/workflow-engine/SKILL.md +178 -250
  49. package/.cursor/hooks/cursor-skill-eval.js +66 -6
  50. package/.cursor/skills/api-development/SKILL.md +179 -130
  51. package/.cursor/skills/architecture-design/SKILL.md +102 -212
  52. package/.cursor/skills/backend-annotations/SKILL.md +166 -220
  53. package/.cursor/skills/bug-detective/SKILL.md +225 -186
  54. package/.cursor/skills/code-patterns/SKILL.md +127 -244
  55. package/.cursor/skills/collaborating-with-codex/SKILL.md +96 -113
  56. package/.cursor/skills/crud-development/SKILL.md +226 -307
  57. package/.cursor/skills/data-permission/SKILL.md +131 -202
  58. package/.cursor/skills/database-ops/SKILL.md +158 -355
  59. package/.cursor/skills/error-handler/SKILL.md +224 -285
  60. package/.cursor/skills/file-oss-management/SKILL.md +174 -169
  61. package/.cursor/skills/git-workflow/SKILL.md +123 -341
  62. package/.cursor/skills/json-serialization/SKILL.md +121 -137
  63. package/.cursor/skills/performance-doctor/SKILL.md +83 -89
  64. package/.cursor/skills/redis-cache/SKILL.md +134 -185
  65. package/.cursor/skills/scheduled-jobs/SKILL.md +187 -224
  66. package/.cursor/skills/security-guard/SKILL.md +168 -276
  67. package/.cursor/skills/sms-mail/SKILL.md +266 -228
  68. package/.cursor/skills/social-login/SKILL.md +257 -195
  69. package/.cursor/skills/tenant-management/SKILL.md +172 -188
  70. package/.cursor/skills/utils-toolkit/SKILL.md +214 -222
  71. package/.cursor/skills/websocket-sse/SKILL.md +251 -172
  72. package/.cursor/skills/workflow-engine/SKILL.md +178 -250
  73. package/AGENTS.md +49 -540
  74. package/CLAUDE.md +73 -119
  75. package/README.md +37 -6
  76. package/bin/index.js +5 -1
  77. package/package.json +1 -1
  78. package/src/skills/api-development/SKILL.md +179 -130
  79. package/src/skills/architecture-design/SKILL.md +102 -212
  80. package/src/skills/backend-annotations/SKILL.md +166 -220
  81. package/src/skills/bug-detective/SKILL.md +225 -186
  82. package/src/skills/code-patterns/SKILL.md +127 -244
  83. package/src/skills/collaborating-with-codex/SKILL.md +96 -113
  84. package/src/skills/crud-development/SKILL.md +226 -307
  85. package/src/skills/data-permission/SKILL.md +131 -202
  86. package/src/skills/database-ops/SKILL.md +158 -355
  87. package/src/skills/error-handler/SKILL.md +224 -285
  88. package/src/skills/file-oss-management/SKILL.md +174 -169
  89. package/src/skills/git-workflow/SKILL.md +123 -341
  90. package/src/skills/json-serialization/SKILL.md +121 -137
  91. package/src/skills/performance-doctor/SKILL.md +83 -89
  92. package/src/skills/redis-cache/SKILL.md +134 -185
  93. package/src/skills/scheduled-jobs/SKILL.md +187 -224
  94. package/src/skills/security-guard/SKILL.md +168 -276
  95. package/src/skills/sms-mail/SKILL.md +266 -228
  96. package/src/skills/social-login/SKILL.md +257 -195
  97. package/src/skills/tenant-management/SKILL.md +172 -188
  98. package/src/skills/utils-toolkit/SKILL.md +214 -222
  99. package/src/skills/websocket-sse/SKILL.md +251 -172
  100. package/src/skills/workflow-engine/SKILL.md +178 -250
  101. package/.claude/skills/skill-creator/LICENSE.txt +0 -202
  102. package/.claude/skills/skill-creator/SKILL.md +0 -479
  103. package/.claude/skills/skill-creator/agents/analyzer.md +0 -274
  104. package/.claude/skills/skill-creator/agents/comparator.md +0 -202
  105. package/.claude/skills/skill-creator/agents/grader.md +0 -223
  106. package/.claude/skills/skill-creator/assets/eval_review.html +0 -146
  107. package/.claude/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  108. package/.claude/skills/skill-creator/eval-viewer/viewer.html +0 -1325
  109. package/.claude/skills/skill-creator/references/schemas.md +0 -430
  110. package/.claude/skills/skill-creator/scripts/__init__.py +0 -0
  111. package/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  112. package/.claude/skills/skill-creator/scripts/generate_report.py +0 -326
  113. package/.claude/skills/skill-creator/scripts/improve_description.py +0 -248
  114. package/.claude/skills/skill-creator/scripts/package_skill.py +0 -136
  115. package/.claude/skills/skill-creator/scripts/quick_validate.py +0 -103
  116. package/.claude/skills/skill-creator/scripts/run_eval.py +0 -310
  117. package/.claude/skills/skill-creator/scripts/run_loop.py +0 -332
  118. package/.claude/skills/skill-creator/scripts/utils.py +0 -47
@@ -10,9 +10,8 @@ description: |
10
10
  - 分页查询优化
11
11
  - N+1 查询问题
12
12
  - 批量操作超时
13
- - 多租户查询优化
14
13
 
15
- 触发词:性能优化、慢查询、SQL优化、索引优化、缓存、Redis缓存、N+1、分页优化、EXPLAIN、响应慢、批量操作、多租户优化
14
+ 触发词:性能优化、慢查询、SQL优化、索引优化、缓存、Redis缓存、N+1、分页优化、EXPLAIN、响应慢、批量操作
16
15
 
17
16
  注意:如果是排查功能性 Bug(代码报错、逻辑错误),请使用 bug-detective。
18
17
  ---
@@ -23,7 +22,7 @@ description: |
23
22
 
24
23
  ```
25
24
  1. 定位 -> 接口层面(响应时间) / SQL层面(慢查询) / 缓存层面(命中率)
26
- 2. 分析 -> p6spy SQL 日志 / Arthas JVM 诊断 / 日志分析
25
+ 2. 分析 -> SQL 日志 / Arthas JVM 诊断 / 日志分析
27
26
  3. 优化 -> 索引 / 缓存 / 批量处理
28
27
  4. 验证 -> 对比优化前后指标
29
28
  ```
@@ -33,51 +32,46 @@ description: |
33
32
  | 指标 | 良好 | 需优化 | 工具 |
34
33
  |------|------|--------|------|
35
34
  | 接口响应 | < 200ms | > 500ms | p6spy/SkyWalking |
36
- | 数据库查询 | < 50ms | > 200ms | p6spy SQL 日志 |
35
+ | 数据库查询 | < 50ms | > 200ms | SQL 日志 |
37
36
  | 内存使用 | < 70% | > 85% | Arthas/JVM 监控 |
38
37
 
39
38
  ---
40
39
 
41
40
  ## 1. MyBatis-Plus 查询优化
42
41
 
43
- > 源码:`ruoyi-modules/ruoyi-demo/.../TestDemoServiceImpl.java:62-73`
44
-
45
42
  ### 查询构建规范
46
43
 
47
44
  ```java
48
45
  import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
49
46
  import com.baomidou.mybatisplus.core.toolkit.Wrappers;
50
47
 
51
- private LambdaQueryWrapper<TestDemo> buildQueryWrapper(TestDemoBo bo) {
52
- Map<String, Object> params = bo.getParams();
53
- LambdaQueryWrapper<TestDemo> lqw = Wrappers.lambdaQuery();
54
- lqw.eq(bo.getDeptId() != null, TestDemo::getDeptId, bo.getDeptId());
55
- lqw.like(StringUtils.isNotBlank(bo.getTestKey()), TestDemo::getTestKey, bo.getTestKey());
56
- lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
57
- TestDemo::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
48
+ private LambdaQueryWrapper<XxxEntity> buildQueryWrapper(XxxQueryDTO query) {
49
+ LambdaQueryWrapper<XxxEntity> lqw = Wrappers.lambdaQuery();
50
+ lqw.eq(query.getDeptId() != null, XxxEntity::getDeptId, query.getDeptId());
51
+ lqw.like(StrUtil.isNotBlank(query.getKeyword()), XxxEntity::getName, query.getKeyword());
52
+ lqw.between(query.getStartTime() != null && query.getEndTime() != null,
53
+ XxxEntity::getCreateTime, query.getStartTime(), query.getEndTime());
58
54
  return lqw;
59
55
  }
60
56
  ```
61
57
 
62
58
  ### 更新构建规范
63
59
 
64
- > 源码:`ruoyi-modules/ruoyi-system/.../SysUserServiceImpl.java:383-404`
65
-
66
60
  ```java
67
61
  import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
68
62
 
69
63
  // 精确更新
70
64
  baseMapper.update(null,
71
- new LambdaUpdateWrapper<SysUser>()
72
- .set(SysUser::getStatus, status)
73
- .eq(SysUser::getUserId, userId));
65
+ new LambdaUpdateWrapper<XxxEntity>()
66
+ .set(XxxEntity::getStatus, status)
67
+ .eq(XxxEntity::getId, id));
74
68
 
75
69
  // 条件更新(非null才设置)
76
70
  baseMapper.update(null,
77
- new LambdaUpdateWrapper<SysUser>()
78
- .set(ObjectUtil.isNotNull(user.getNickName()), SysUser::getNickName, user.getNickName())
79
- .set(SysUser::getPhonenumber, user.getPhonenumber())
80
- .eq(SysUser::getUserId, user.getUserId()));
71
+ new LambdaUpdateWrapper<XxxEntity>()
72
+ .set(ObjectUtil.isNotNull(entity.getName()), XxxEntity::getName, entity.getName())
73
+ .set(XxxEntity::getPhone, entity.getPhone())
74
+ .eq(XxxEntity::getId, entity.getId()));
81
75
  ```
82
76
 
83
77
  ### 批量更新
@@ -94,15 +88,15 @@ Db.updateBatchById(entityList);
94
88
  ### N+1 查询修复
95
89
 
96
90
  ```java
97
- // 错误:循环查询
91
+ // 错误:循环查询
98
92
  for (Order order : orders) {
99
93
  User user = userMapper.selectById(order.getUserId());
100
94
  }
101
95
 
102
- // 正确:批量查询 + Map 映射
96
+ // 正确:批量查询 + Map 映射
103
97
  List<Long> userIds = orders.stream().map(Order::getUserId).distinct().toList();
104
98
  Map<Long, User> userMap = userMapper.selectBatchIds(userIds).stream()
105
- .collect(Collectors.toMap(User::getUserId, Function.identity()));
99
+ .collect(Collectors.toMap(User::getId, Function.identity()));
106
100
  for (Order order : orders) {
107
101
  User user = userMap.get(order.getUserId());
108
102
  }
@@ -112,17 +106,21 @@ for (Order order : orders) {
112
106
 
113
107
  ## 2. 缓存优化
114
108
 
115
- > 源码:`ruoyi-common/ruoyi-common-redis/.../RedisUtils.java`
116
-
117
- ### RedisUtils 操作
109
+ ### Redisson 缓存操作
118
110
 
119
111
  ```java
120
- import org.dromara.common.redis.utils.RedisUtils;
112
+ import org.redisson.api.RedissonClient;
113
+ import org.redisson.api.RBucket;
114
+
115
+ // 设置缓存
116
+ RBucket<UserVo> bucket = redissonClient.getBucket("user:" + id);
117
+ bucket.set(userVo, Duration.ofMinutes(30));
121
118
 
122
- RedisUtils.setCacheObject("user:" + id, userVo, Duration.ofMinutes(30));
123
- UserVo cached = RedisUtils.getCacheObject("user:" + id);
124
- RedisUtils.deleteObject("user:" + id);
125
- boolean exists = RedisUtils.isExistsObject("user:" + id);
119
+ // 获取缓存
120
+ UserVo cached = redissonClient.<UserVo>getBucket("user:" + id).get();
121
+
122
+ // 删除缓存
123
+ redissonClient.getBucket("user:" + id).delete();
126
124
  ```
127
125
 
128
126
  ### Spring Cache 注解
@@ -137,40 +135,42 @@ public int update(UserBo bo) { ... }
137
135
 
138
136
  > **@Cacheable 禁止返回不可变集合**(`List.of()`、`Set.of()`),Redis 反序列化会失败。必须用 `new ArrayList<>(List.of(...))`。
139
137
 
140
- ### 分布式锁(Lock4j)
141
-
142
- > 源码:`ruoyi-modules/ruoyi-demo/.../RedisLockController.java:47-67`
138
+ ### 分布式锁
143
139
 
144
140
  ```java
145
- import com.baomidou.lock.annotation.Lock4j;
146
- import com.baomidou.lock.LockTemplate;
147
- import com.baomidou.lock.LockInfo;
148
- import com.baomidou.lock.executor.RedissonLockExecutor;
149
-
150
- // 注解方式(推荐)
151
- @Lock4j(keys = {"#key"}, expire = 60000, acquireTimeout = 3000)
152
- public void doSomething(String key) { ... }
153
-
154
- // 编程方式
155
- LockInfo lockInfo = lockTemplate.lock(key, 30000L, 5000L, RedissonLockExecutor.class);
156
- if (null == lockInfo) {
157
- throw new ServiceException("业务处理中,请稍后再试");
158
- }
141
+ import org.redisson.api.RLock;
142
+
143
+ // 注入 RedissonClient
144
+ RLock lock = redissonClient.getLock("lock:order:" + orderId);
159
145
  try {
160
- // 业务逻辑
161
- } finally {
162
- lockTemplate.releaseLock(lockInfo);
146
+ if (lock.tryLock(3, 10, TimeUnit.SECONDS)) {
147
+ try {
148
+ // 业务逻辑
149
+ } finally {
150
+ if (lock.isLocked() && lock.isHeldByCurrentThread()) {
151
+ lock.unlock();
152
+ }
153
+ }
154
+ } else {
155
+ throw new [你的异常类]("业务处理中,请稍后再试");
156
+ }
157
+ } catch (InterruptedException e) {
158
+ Thread.currentThread().interrupt();
159
+ throw new [你的异常类]("操作被中断");
163
160
  }
164
161
  ```
165
162
 
166
163
  ### 限流
167
164
 
168
165
  ```java
166
+ import org.redisson.api.RRateLimiter;
169
167
  import org.redisson.api.RateType;
168
+ import org.redisson.api.RateIntervalUnit;
170
169
 
171
- long remaining = RedisUtils.rateLimiter("api:rate:" + userId, RateType.OVERALL, 100, 60);
172
- if (remaining < 0) {
173
- throw new ServiceException("请求过于频繁");
170
+ RRateLimiter limiter = redissonClient.getRateLimiter("api:rate:" + userId);
171
+ limiter.trySetRate(RateType.OVERALL, 100, 60, RateIntervalUnit.SECONDS);
172
+ if (!limiter.tryAcquire()) {
173
+ throw new [你的异常类]("请求过于频繁");
174
174
  }
175
175
  ```
176
176
 
@@ -187,23 +187,26 @@ private final Cache<Long, UserVo> localCache = Caffeine.newBuilder()
187
187
 
188
188
  public UserVo getUser(Long id) {
189
189
  return localCache.get(id, key -> {
190
- UserVo cached = RedisUtils.getCacheObject("user:" + id);
191
- return cached != null ? cached : baseMapper.selectVoById(id);
190
+ RBucket<UserVo> bucket = redissonClient.getBucket("user:" + id);
191
+ UserVo cached = bucket.get();
192
+ return cached != null ? cached : baseMapper.selectById(id);
192
193
  });
193
194
  }
194
195
  ```
195
196
 
196
197
  ---
197
198
 
198
- ## 3. 多租户优化
199
+ ## 3. 索引优化
199
200
 
200
201
  ```sql
201
- -- tenant_id 必须建索引
202
- CREATE INDEX idx_tenant_id ON xxx_table(tenant_id);
202
+ -- 为高频查询字段添加索引
203
+ CREATE INDEX idx_status ON xxx_table(status);
204
+
205
+ -- 复合索引:遵循最左前缀原则
206
+ CREATE INDEX idx_status_create_time ON xxx_table(status, create_time);
203
207
 
204
- -- 复合索引第一列放 tenant_id(多租户自动添加 tenant_id 条件)
205
- CREATE INDEX idx_tenant_status ON xxx_table(tenant_id, status);
206
- CREATE INDEX idx_tenant_create_time ON xxx_table(tenant_id, create_time);
208
+ -- 使用 EXPLAIN 分析查询
209
+ EXPLAIN SELECT * FROM xxx_table WHERE status = 1 AND create_time > '2026-01-01';
207
210
  ```
208
211
 
209
212
  ---
@@ -212,7 +215,7 @@ CREATE INDEX idx_tenant_create_time ON xxx_table(tenant_id, create_time);
212
215
 
213
216
  ```java
214
217
  // 推荐:分批处理(每批500条)
215
- public void batchInsert(List<Xxx> list) {
218
+ public void batchInsert(List<XxxEntity> list) {
216
219
  int batchSize = 500;
217
220
  for (int i = 0; i < list.size(); i += batchSize) {
218
221
  int end = Math.min(i + batchSize, list.size());
@@ -222,12 +225,13 @@ public void batchInsert(List<Xxx> list) {
222
225
 
223
226
  // 批量更新同理
224
227
  @Transactional(rollbackFor = Exception.class)
225
- public void batchUpdate(List<XxxBo> list) {
228
+ public void batchUpdate(List<XxxDTO> list) {
226
229
  int batchSize = 500;
227
230
  for (int i = 0; i < list.size(); i += batchSize) {
228
231
  int end = Math.min(i + batchSize, list.size());
229
- List<Xxx> batch = list.subList(i, end).stream()
230
- .map(bo -> MapstructUtils.convert(bo, Xxx.class)).toList();
232
+ List<XxxEntity> batch = list.subList(i, end).stream()
233
+ .map(dto -> BeanUtil.copyProperties(dto, XxxEntity.class))
234
+ .toList();
231
235
  Db.updateBatchById(batch);
232
236
  }
233
237
  }
@@ -237,15 +241,6 @@ public void batchUpdate(List<XxxBo> list) {
237
241
 
238
242
  ## 5. 性能日志分析
239
243
 
240
- > 日志配置:`ruoyi-admin/src/main/resources/logback-plus.xml:52-72`
241
-
242
- ### 日志文件
243
-
244
- | 环境 | 文件 | 说明 |
245
- |------|------|------|
246
- | **开发** | `./logs/console.log` | 每次启动清空,含 SQL 日志 |
247
- | 生产 | `./logs/sys-*.log` | 按天滚动,保留60天 |
248
-
249
244
  ### SQL 监控
250
245
 
251
246
  开发环境 p6spy 默认开启:`spring.datasource.dynamic.p6spy: true`
@@ -253,18 +248,9 @@ public void batchUpdate(List<XxxBo> list) {
253
248
  日志格式:
254
249
  ```
255
250
  2026-01-08 22:12:10 [req-123] [...] INFO p6spy - Consume Time:245 ms
256
- Execute SQL:SELECT * FROM sys_user WHERE tenant_id = '000000' AND del_flag = '0'
251
+ Execute SQL:SELECT * FROM user WHERE status = 1
257
252
  ```
258
253
 
259
- ### AI 主动读日志的触发条件
260
-
261
- | 场景 | 关键词 | 分析重点 |
262
- |------|--------|---------|
263
- | 接口慢 | "接口慢"、"超时" | SQL 执行时间、N+1 查询 |
264
- | SQL 慢 | "SQL慢"、"查询慢" | p6spy Consume Time |
265
- | 内存/CPU | "内存高"、"卡顿" | OOM、GC、线程池满 |
266
- | 频繁报错 | "一直报错" | ERROR 日志、异常频率 |
267
-
268
254
  ### 分析命令
269
255
 
270
256
  ```bash
@@ -278,6 +264,15 @@ grep "Execute SQL" ./logs/console.log | sed 's/WHERE.*/WHERE .../' | sort | uniq
278
264
  grep "ERROR" ./logs/console.log | tail -50
279
265
  ```
280
266
 
267
+ ### AI 主动读日志的触发条件
268
+
269
+ | 场景 | 关键词 | 分析重点 |
270
+ |------|--------|---------|
271
+ | 接口慢 | "接口慢"、"超时" | SQL 执行时间、N+1 查询 |
272
+ | SQL 慢 | "SQL慢"、"查询慢" | p6spy Consume Time |
273
+ | 内存/CPU | "内存高"、"卡顿" | OOM、GC、线程池满 |
274
+ | 频繁报错 | "一直报错" | ERROR 日志、异常频率 |
275
+
281
276
  ---
282
277
 
283
278
  ## 常见问题速查
@@ -286,10 +281,9 @@ grep "ERROR" ./logs/console.log | tail -50
286
281
  |------|------|------|
287
282
  | 接口响应慢 | SQL 无索引 | 添加索引,EXPLAIN 分析 |
288
283
  | 接口响应慢 | N+1 查询 | 批量查询 + Map 映射 |
289
- | 接口响应慢 | 未缓存 | RedisUtils 或 @Cacheable |
284
+ | 接口响应慢 | 未缓存 | Redisson 或 @Cacheable |
290
285
  | 分页查询慢 | 深分页 | 游标分页或限制页码 |
291
286
  | 批量操作超时 | 数据量太大 | 分批500条处理 |
292
- | 多租户查询慢 | tenant_id 无索引 | 添加 tenant_id 复合索引 |
293
287
  | 内存溢出 | 大数据量一次加载 | 分批/流式处理 |
294
288
 
295
289
  ---