ai-engineering-init 1.2.3 → 1.2.4

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 (29) hide show
  1. package/.cursor/skills/leniu-api-development/SKILL.md +1 -1
  2. package/.cursor/skills/leniu-architecture-design/SKILL.md +1 -1
  3. package/.cursor/skills/leniu-backend-annotations/SKILL.md +1 -1
  4. package/.cursor/skills/leniu-brainstorm/SKILL.md +651 -0
  5. package/.cursor/skills/leniu-code-patterns/SKILL.md +48 -2
  6. package/.cursor/skills/leniu-crud-development/SKILL.md +1 -1
  7. package/.cursor/skills/leniu-data-permission/SKILL.md +15 -0
  8. package/.cursor/skills/leniu-database-ops/SKILL.md +1 -1
  9. package/.cursor/skills/leniu-error-handler/SKILL.md +1 -1
  10. package/.cursor/skills/leniu-java-amount-handling/SKILL.md +1 -1
  11. package/.cursor/skills/leniu-java-concurrent/SKILL.md +1 -1
  12. package/.cursor/skills/leniu-java-entity/SKILL.md +1 -1
  13. package/.cursor/skills/leniu-java-export/SKILL.md +24 -23
  14. package/.cursor/skills/leniu-java-logging/SKILL.md +1 -1
  15. package/.cursor/skills/leniu-java-mq/SKILL.md +1 -1
  16. package/.cursor/skills/leniu-java-mybatis/SKILL.md +1 -1
  17. package/.cursor/skills/leniu-java-report-query-param/SKILL.md +1 -1
  18. package/.cursor/skills/leniu-java-task/SKILL.md +1 -1
  19. package/.cursor/skills/leniu-java-total-line/SKILL.md +21 -20
  20. package/.cursor/skills/leniu-marketing-price-rule-customizer/SKILL.md +1 -1
  21. package/.cursor/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +1 -1
  22. package/.cursor/skills/leniu-mealtime/SKILL.md +1 -1
  23. package/.cursor/skills/leniu-redis-cache/SKILL.md +15 -0
  24. package/.cursor/skills/leniu-report-customization/SKILL.md +549 -0
  25. package/.cursor/skills/leniu-security-guard/SKILL.md +1 -1
  26. package/.cursor/skills/leniu-utils-toolkit/SKILL.md +1 -1
  27. package/README.md +1 -1
  28. package/package.json +1 -1
  29. package/.cursor/skills/leniu-java-code-style/SKILL.md +0 -510
@@ -10,8 +10,7 @@ description: |
10
10
  - 避免过度工程
11
11
  - 代码风格检查
12
12
 
13
- 触发词:规范、禁止、命名、Git提交、代码风格、不能用、不允许、包名、架构、leniupigx
14
- 注意:leniu CRUD 开发规范请激活 leniu-crud-development,API 开发规范请激活 leniu-api-development。
13
+ 触发词:代码禁令、代码规范、命名规范、代码风格、Git提交规范、包结构、禁止写法、审计字段规范、delFlagcrby/crtime
15
14
  ---
16
15
 
17
16
  # leniu-tengyun-core 代码规范速查
@@ -348,6 +347,53 @@ Target target = BeanUtil.copyProperties(source, Target.class);
348
347
  List<Target> targets = BeanUtil.copyToList(sources, Target.class);
349
348
  ```
350
349
 
350
+ ## 包结构规范
351
+
352
+ ```
353
+ net.xnzn.core
354
+ ├── [module]/
355
+ │ ├── controller/ # 控制器层(按端分:web/mobile/android)
356
+ │ ├── business/impl/ # 业务编排层
357
+ │ ├── service/impl/ # 服务层
358
+ │ ├── mapper/ # 数据访问层(含 XML 同目录)
359
+ │ ├── model/ # 数据模型(Entity)
360
+ │ ├── vo/ # 视图对象(返回前端)
361
+ │ ├── dto/ # 数据传输对象(服务间/MQ)
362
+ │ ├── param/ # 请求参数对象
363
+ │ ├── constants/ # 常量和枚举
364
+ │ ├── config/ # 配置类
365
+ │ ├── mq/ # 消息队列监听器
366
+ │ ├── task/ # 定时任务
367
+ │ ├── handle/ # 业务处理器(策略模式)
368
+ │ └── util/ # 工具类
369
+ ```
370
+
371
+ ## 依赖注入规范
372
+
373
+ ```java
374
+ // 推荐:字段注入
375
+ @Autowired
376
+ private OrderService orderService;
377
+
378
+ // 解决循环依赖
379
+ @Resource
380
+ @Lazy
381
+ private ProductService productService;
382
+ ```
383
+
384
+ ## 类注释规范
385
+
386
+ ```java
387
+ /**
388
+ * 类功能描述
389
+ *
390
+ * @author xujiajun
391
+ * @date 2026-02-20
392
+ */
393
+ public class OrderService {
394
+ }
395
+ ```
396
+
351
397
  ## 通用代码规范
352
398
 
353
399
  无论使用哪种项目架构,以下规范都是通用的:
@@ -17,7 +17,7 @@ description: |
17
17
  - leniu-tengyun-core(云食堂核心服务)
18
18
  - leniu-yunshitang(云食堂业务服务)
19
19
 
20
- 触发词:leniu-CRUD、leniu-增删改查、leniu-新建模块、leniu-Entity、leniu-DTO、leniu-VO、leniu-Service、leniu-Mapper、leniu-Controller、leniu-分页查询、LeRequest、PageDTO、net.xnzn、leniu-yunshitang、云食堂CRUD、leniu-事务、leniu-并发、leniu-代码质量、leniu-空指针、leniu-ServiceImpl
20
+ 触发词:CRUD、增删改查、新建模块、Business层、Service、Mapper、Controller、分页查询、LeRequest、PageDTO、PageVO、事务管理
21
21
  ---
22
22
 
23
23
  # leniu CRUD 开发规范
@@ -1,3 +1,18 @@
1
+ ---
2
+ name: leniu-data-permission
3
+ description: |
4
+ leniu-tengyun-core 项目多租户数据权限控制规范。基于物理数据库隔离的双库架构,包含数据源切换、租户上下文、跨租户操作。
5
+
6
+ 触发场景:
7
+ - 使用 @UseSystem 切换系统库操作
8
+ - 使用 Executors.doInTenant/readInTenant 跨租户查询
9
+ - 使用 TenantContextHolder 获取租户上下文
10
+ - 配置双库数据源路由
11
+ - 跨租户数据初始化
12
+
13
+ 触发词:多租户、数据权限、@UseSystem、Executors.doInTenant、readInSystem、TenantContextHolder、MERCHANT-ID、双库隔离、数据源切换
14
+ ---
15
+
1
16
  # leniu-data-permission
2
17
 
3
18
  适用于 leniu-tengyun-core 项目的多租户数据权限控制。
@@ -12,7 +12,7 @@ description: |
12
12
 
13
13
  适用项目:leniu-tengyun-core(云食堂项目)
14
14
 
15
- 触发词:leniu-数据库、leniu-SQL、leniu-建表、leniu-Entityleniu-双库、leniu-商户库、leniu-系统库、net.xnzn、leniu-yunshitang、云食堂数据库
15
+ 触发词:数据库、SQL、建表、双库、商户库、系统库、审计字段、crbycrtimedel_flag
16
16
  ---
17
17
 
18
18
  # leniu-yunshitang-core 数据库操作规范
@@ -13,7 +13,7 @@ description: |
13
13
 
14
14
  适用项目:leniu-tengyun-core(云食堂项目)
15
15
 
16
- 触发词:leniu-异常、leniu-LeException、leniu-throw、leniu-错误处理、leniu-全局异常、leniu-@Validated、leniu-参数校验、leniu-日志、leniu-log、leniu-错误码、leniu-事务、leniu-I18n、net.xnzn、leniu-yunshitang、云食堂异常
16
+ 触发词:异常处理、LeException、全局异常、参数校验、错误码、I18n、国际化、throw
17
17
  ---
18
18
 
19
19
  # leniu-yunshitang-core 异常处理指南
@@ -9,7 +9,7 @@ description: |
9
9
  - Excel 导出含金额列,需分转元
10
10
  - 报表合计查询含金额汇总
11
11
 
12
- 触发词:金额、分转元、元转分、Long 金额、money、fen、cents、金额字段、金额处理、AmountConverter、AmountUtil
12
+ 触发词:金额处理、分转元、元转分、Long金额、money、fen、BigDecimal金额、金额字段
13
13
  ---
14
14
 
15
15
  # leniu-tengyun-core 金额处理规范
@@ -13,7 +13,7 @@ description: |
13
13
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
14
14
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
15
15
 
16
- 触发词:并发、CompletableFuture、线程池、ThreadPool、并发安全、锁、synchronized、volatile、原子类、异步处理、leniu并发、leniu-yunshitang并发、net.xnzn并发
16
+ 触发词:并发、CompletableFuture、线程池、ThreadPool、并发安全、异步处理、synchronized
17
17
  ---
18
18
 
19
19
  # leniu-tengyun-core 并发处理规范
@@ -10,7 +10,7 @@ description: |
10
10
  - 配置时间格式化和参数校验
11
11
  - 使用 Jakarta Validation 注解
12
12
 
13
- 触发词:EntityVODTOParam、实体类、@TableName、@TableField、@JsonFormat、字段映射、数据对象、@NotNull、@NotBlank、jakarta.validation
13
+ 触发词:Entity实体类、VO视图对象、DTO数据传输、Param参数类、@TableName、@TableField、审计字段、字段映射
14
14
  ---
15
15
 
16
16
  # leniu-tengyun-core Entity/VO/DTO 规范
@@ -13,7 +13,7 @@ description: |
13
13
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
14
14
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
15
15
 
16
- 触发词:导出、Export、Excel导出、异步导出、分页导出、@ExcelProperty、exportApi、数据导出、导出接口、leniu导出、leniu-yunshitang导出、net.xnzn导出
16
+ 触发词:导出、Excel导出、异步导出、分页导出、@ExcelProperty、exportApi、数据导出
17
17
  ---
18
18
 
19
19
  # leniu-tengyun-core 数据导出规范
@@ -251,29 +251,30 @@ public PageVO<XxxVO> pageList(XxxPageParam param) {
251
251
  ### 带合计行的导出
252
252
 
253
253
  ```java
254
+ // ⚠️ 系统默认在商户库执行,业务查询无需 Executors.readInSystem()
255
+ // Executors.readInSystem() 仅用于需要访问系统库的场景(如全局配置、商户管理)
256
+
254
257
  public ReportBaseTotalVO<XxxVO> pageWithTotal(XxxPageParam param) {
255
- return Executors.readInSystem(() -> {
256
- ReportBaseTotalVO<XxxVO> result = new ReportBaseTotalVO<>();
257
-
258
- // 1. 导出时不查询合计行(避免不必要的性能开销)
259
- if (CollUtil.isEmpty(param.getExportCols())) {
260
- XxxVO totalLine = mapper.getSummaryTotal(param);
261
- result.setTotalLine(totalLine);
262
- }
263
-
264
- // 2. 导出时不分页
265
- if (CollUtil.isNotEmpty(param.getExportCols())) {
266
- List<XxxVO> list = mapper.getSummaryList(param);
267
- result.setResultPage(PageVO.of(list));
268
- } else {
269
- // 正常分页查询
270
- PageMethod.startPage(param);
271
- List<XxxVO> list = mapper.getSummaryList(param);
272
- result.setResultPage(PageVO.of(list));
273
- }
274
-
275
- return result;
276
- });
258
+ ReportBaseTotalVO<XxxVO> result = new ReportBaseTotalVO<>();
259
+
260
+ // 1. 导出时不查询合计行(避免不必要的性能开销)
261
+ if (CollUtil.isEmpty(param.getExportCols())) {
262
+ XxxVO totalLine = mapper.getSummaryTotal(param);
263
+ result.setTotalLine(totalLine);
264
+ }
265
+
266
+ // 2. 导出时不分页
267
+ if (CollUtil.isNotEmpty(param.getExportCols())) {
268
+ List<XxxVO> list = mapper.getSummaryList(param);
269
+ result.setResultPage(PageVO.of(list));
270
+ } else {
271
+ // 正常分页查询
272
+ PageMethod.startPage(param);
273
+ List<XxxVO> list = mapper.getSummaryList(param);
274
+ result.setResultPage(PageVO.of(list));
275
+ }
276
+
277
+ return result;
277
278
  }
278
279
  ```
279
280
 
@@ -10,7 +10,7 @@ description: |
10
10
  - 业务关键路径日志埋点
11
11
  - 日志文件管理和保留策略
12
12
 
13
- 触发词:日志、@Slf4j、log.info、log.error、log.debug、log.warn、日志级别、日志格式、日志记录、logging、logback、leniu-yunshitang、leniu-tengyun-core、net.xnzn
13
+ 触发词:日志、@Slf4j、log.info、log.error、log.debug、日志级别、logback、日志格式
14
14
  ---
15
15
 
16
16
  # leniu-tengyun-core / leniu-yunshitang 日志规范
@@ -13,7 +13,7 @@ description: |
13
13
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
14
14
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
15
15
 
16
- 触发词:leniu-消息队列、leniu-MQ、leniu-MqUtil、leniu-@MqConsumer、leniu-延迟消息、leniu-消息重试、leniu-事务消息、net.xnzn、leniu-yunshitang
16
+ 触发词:消息队列、MQ、MqUtil、@MqConsumer、延迟消息、消息重试、事务消息
17
17
  ---
18
18
 
19
19
  # leniu-tengyun-core 消息队列规范
@@ -10,7 +10,7 @@ description: |
10
10
  - 使用 MyBatis Plus 分页查询
11
11
  - 处理租户隔离(@InterceptorIgnore)
12
12
 
13
- 触发词:MyBatis、MyBatisPlus、Mapper、LambdaQueryWrapper、LambdaQuery、XML映射、动态SQL、selectPage、BaseMapper、@Select、resultMap、租户隔离、delFlag
13
+ 触发词:MyBatis、MyBatisPlus、Mapper、LambdaQueryWrapper、XML映射、动态SQL、BaseMapper、@Select、resultMap
14
14
  ---
15
15
 
16
16
  # leniu-tengyun-core MyBatis 规范
@@ -13,7 +13,7 @@ description: |
13
13
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
14
14
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
15
15
 
16
- 触发词:leniu-报表查询、leniu-Param类、leniu-查询入参、leniu-分页参数、leniu-时间范围、leniu-ReportBaseParam、leniu-exportCols、net.xnzn、leniu-yunshitang
16
+ 触发词:报表查询入参、Param类、分页参数、时间范围查询、ReportBaseParam、exportCols
17
17
  ---
18
18
 
19
19
  # leniu-tengyun-core 报表查询入参规范
@@ -13,7 +13,7 @@ description: |
13
13
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
14
14
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
15
15
 
16
- 触发词:leniu-定时任务、leniu-XXL-Job、leniu-@XxlJob、leniu-TenantLoader、leniu-TenantContextHolder、leniu-分布式锁、net.xnzn、leniu-yunshitang
16
+ 触发词:定时任务、XXL-Job、@XxlJob、TenantLoader、任务调度、分布式定时
17
17
  ---
18
18
 
19
19
  # leniu-tengyun-core 定时任务规范
@@ -13,7 +13,7 @@ description: |
13
13
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
14
14
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
15
15
 
16
- 触发词:leniu-合计行、leniu-totalLine、leniu-报表合计、leniu-合计查询、leniu-SUM合计、leniu-ReportBaseTotalVO、net.xnzn、leniu-yunshitang
16
+ 触发词:合计行、totalLine、报表合计、SUM合计、ReportBaseTotalVO、合计查询
17
17
  ---
18
18
 
19
19
  # leniu-tengyun-core 合计行(Total Line)规范
@@ -24,7 +24,7 @@ description: |
24
24
  |------|------|
25
25
  | **包名前缀** | `net.xnzn.core.*` |
26
26
  | **JDK 版本** | 21 |
27
- | **跨租户工具** | `Executors.readInSystem()` |
27
+ | **双库切换** | 默认商户库,`Executors.doInSystem()` 切换系统库 |
28
28
  | **分页工具** | `PageMethod.startPage()` |
29
29
  | **结果封装** | `ReportBaseTotalVO<T>` |
30
30
  | **分页封装** | `PageVO.of()` |
@@ -38,32 +38,32 @@ description: |
38
38
  ### 带合计行的分页查询
39
39
 
40
40
  ```java
41
- import net.xnzn.framework.data.executor.Executors;
42
41
  import net.xnzn.core.common.page.PageMethod;
43
42
  import net.xnzn.core.common.page.PageVO;
44
43
  import net.xnzn.core.common.vo.ReportBaseTotalVO;
45
44
  import cn.hutool.core.collection.CollUtil;
46
45
 
46
+ // ⚠️ 系统默认在商户库执行,业务查询无需 Executors.readInSystem()
47
+ // Executors.readInSystem() 仅用于需要访问系统库的场景(如全局配置、商户管理)
48
+
47
49
  public ReportBaseTotalVO<XxxVO> pageWithTotal(XxxPageParam param) {
48
- return Executors.readInSystem(() -> {
49
- ReportBaseTotalVO<XxxVO> result = new ReportBaseTotalVO<>();
50
+ ReportBaseTotalVO<XxxVO> result = new ReportBaseTotalVO<>();
50
51
 
51
- // 1. 导出时不查询合计行(避免不必要的性能开销)
52
- if (CollUtil.isEmpty(param.getExportCols())) {
53
- XxxVO totalLine = mapper.getSummaryTotal(param);
54
- result.setTotalLine(totalLine);
55
- }
52
+ // 1. 导出时不查询合计行(避免不必要的性能开销)
53
+ if (CollUtil.isEmpty(param.getExportCols())) {
54
+ XxxVO totalLine = mapper.getSummaryTotal(param);
55
+ result.setTotalLine(totalLine);
56
+ }
56
57
 
57
- // 2. 开启分页
58
- PageMethod.startPage(param.getPage());
58
+ // 2. 开启分页
59
+ PageMethod.startPage(param.getPage());
59
60
 
60
- // 3. 查询数据
61
- List<XxxVO> list = mapper.getSummaryList(param);
61
+ // 3. 查询数据
62
+ List<XxxVO> list = mapper.getSummaryList(param);
62
63
 
63
- // 4. 封装分页结果
64
- result.setResultPage(PageVO.of(list));
65
- return result;
66
- });
64
+ // 4. 封装分页结果
65
+ result.setResultPage(PageVO.of(list));
66
+ return result;
67
67
  }
68
68
  ```
69
69
 
@@ -71,7 +71,8 @@ public ReportBaseTotalVO<XxxVO> pageWithTotal(XxxPageParam param) {
71
71
 
72
72
  ```java
73
73
  public XxxVO getSummaryTotal(XxxPageParam param) {
74
- return Executors.readInSystem(() -> mapper.getSummaryTotal(param));
74
+ // 默认在商户库执行,无需 Executors 包装
75
+ return mapper.getSummaryTotal(param);
75
76
  }
76
77
  ```
77
78
 
@@ -190,6 +191,6 @@ public void exportExcel(XxxParam param, HttpServletResponse response) {
190
191
  ## 注意事项
191
192
 
192
193
  - 合计SQL只返回数值字段,不返回字符串、ID、名称等
193
- - 使用 `Executors.readInSystem()` 跨租户查询
194
+ - 业务查询默认在商户库执行,无需 `Executors` 包装;仅访问系统库数据时才使用 `Executors.doInSystem()`
194
195
  - 导出时通过 `exportCols` 判断是否需要合计行
195
196
  - 金额字段类型与 Entity 保持一致:订单模块用 `BigDecimal`,钱包模块用 `Long`(详见 leniu-java-amount-handling)
@@ -14,7 +14,7 @@ description: |
14
14
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
15
15
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
16
16
 
17
- 触发词:营销计费、price规则、计价规则、RulePriceHandler、RulePriceEnum、折扣规则、满减规则、限额规则、补贴规则、营销规则定制、leniu营销、leniu-yunshitang、net.xnzn
17
+ 触发词:营销计费、计价规则、RulePriceHandler、RulePriceEnum、折扣规则、满减规则、限额规则、补贴规则
18
18
  ---
19
19
 
20
20
  # leniu-tengyun-core 营销计费规则定制
@@ -14,7 +14,7 @@ description: |
14
14
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
15
15
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
16
16
 
17
- 触发词:营销充值、recharge规则、充值规则、RuleRechargeHandler、RuleRechargeEnum、满赠规则、充值赠送、充值限额、管理费规则、充值规则定制、leniu营销、leniu-yunshitang、net.xnzn
17
+ 触发词:营销充值、充值规则、RuleRechargeHandler、RuleRechargeEnum、满赠规则、充值赠送、管理费规则
18
18
  ---
19
19
 
20
20
  # leniu-tengyun-core 营销充值规则定制
@@ -14,7 +14,7 @@ description: |
14
14
  - leniu-tengyun-core:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun-core
15
15
  - leniu-yunshitang:/Users/xujiajun/Developer/gongsi_proj/leniu-api/leniu-tengyun/leniu-yunshitang
16
16
 
17
- 触发词:餐次、mealtime、mealtimeType、早餐、午餐、晚餐、下午茶、夜宵、AllocMealtimeTypeEnum、MealtimeTypeConverter、正餐、leniu餐次、leniu-yunshitang、net.xnzn
17
+ 触发词:餐次、mealtime、mealtimeType、早餐、午餐、晚餐、下午茶、夜宵、AllocMealtimeTypeEnum
18
18
  ---
19
19
 
20
20
  # leniu-tengyun-core 餐次处理规范
@@ -1,3 +1,18 @@
1
+ ---
2
+ name: leniu-redis-cache
3
+ description: |
4
+ leniu-tengyun-core 项目 Redis 缓存和分布式锁操作规范。包含 RedisUtil 工具类、分布式锁、ZSet 排行榜、缓存 Key 命名规范。
5
+
6
+ 触发场景:
7
+ - 使用 RedisUtil 进行缓存操作(setString/setObj/getObj)
8
+ - 实现分布式锁(getLock/lock/unlock)
9
+ - 使用 Redis 自增自减计数器(incr/decr)
10
+ - 实现缓存击穿保护
11
+ - ZSet 排行榜操作
12
+
13
+ 触发词:Redis、缓存、RedisUtil、分布式锁、RLock、getLock、setNx、ZSet、限流、缓存击穿
14
+ ---
15
+
1
16
  # leniu-redis-cache
2
17
 
3
18
  适用于 leniu-tengyun-core 项目的 Redis 缓存和分布式锁操作。