ai-engineering-init 1.1.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.
- package/.claude/agents/code-reviewer.md +139 -0
- package/.claude/agents/project-manager.md +159 -0
- package/.claude/audio/completed.wav +0 -0
- package/.claude/commands/add-todo.md +255 -0
- package/.claude/commands/check.md +210 -0
- package/.claude/commands/crud.md +454 -0
- package/.claude/commands/dev.md +503 -0
- package/.claude/commands/init-docs.md +681 -0
- package/.claude/commands/next.md +251 -0
- package/.claude/commands/progress.md +242 -0
- package/.claude/commands/start.md +199 -0
- package/.claude/commands/sync.md +307 -0
- package/.claude/commands/update-status.md +428 -0
- package/.claude/docs/Mixin/344/275/277/347/224/250/346/214/207/345/215/227.md +299 -0
- package/.claude/docs/README.md +167 -0
- package/.claude/docs//345/211/215/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +599 -0
- package/.claude/docs//345/220/216/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +726 -0
- package/.claude/docs//345/267/245/344/275/234/346/265/201/345/274/200/345/217/221/346/214/207/345/215/227.md +714 -0
- package/.claude/docs//345/267/245/345/205/267/347/261/273/344/275/277/347/224/250/346/214/207/345/215/227.md +463 -0
- package/.claude/docs//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/350/247/204/350/214/203.md +390 -0
- package/.claude/docs//346/226/260/345/212/237/350/203/275/345/274/200/345/217/221/346/265/201/347/250/213/350/247/204/350/214/203.md +688 -0
- package/.claude/docs//346/226/260/351/241/271/347/233/256/345/274/200/345/217/221/346/265/201/347/250/213.md +365 -0
- package/.claude/docs//346/241/206/346/236/266/350/257/264/346/230/216.md +393 -0
- package/.claude/docs//350/267/257/347/224/261/351/205/215/347/275/256/346/214/207/345/215/227.md +246 -0
- package/.claude/framework-config.json +73 -0
- package/.claude/hooks/pre-tool-use.js +117 -0
- package/.claude/hooks/skill-forced-eval.js +167 -0
- package/.claude/hooks/stop.js +58 -0
- package/.claude/settings.json +41 -0
- package/.claude/skills/add-skill/SKILL.md +352 -0
- package/.claude/skills/api-development/SKILL.md +560 -0
- package/.claude/skills/architecture-design/SKILL.md +756 -0
- package/.claude/skills/backend-annotations/SKILL.md +674 -0
- package/.claude/skills/banana-image/CHANGELOG.md +37 -0
- package/.claude/skills/banana-image/README.md +146 -0
- package/.claude/skills/banana-image/SKILL.md +164 -0
- package/.claude/skills/banana-image/assets/logo.png +0 -0
- package/.claude/skills/banana-image/references/advanced-usage.md +189 -0
- package/.claude/skills/banana-image/scripts/apply_template.py +125 -0
- package/.claude/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.claude/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.claude/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.claude/skills/banana-image/scripts/package.json +18 -0
- package/.claude/skills/banana-image/scripts/requirements.txt +10 -0
- package/.claude/skills/banana-image/templates/poster.json +22 -0
- package/.claude/skills/banana-image/templates/product.json +17 -0
- package/.claude/skills/banana-image/templates/social.json +22 -0
- package/.claude/skills/banana-image/templates/thumbnail.json +17 -0
- package/.claude/skills/brainstorm/SKILL.md +648 -0
- package/.claude/skills/bug-detective/SKILL.md +1206 -0
- package/.claude/skills/code-patterns/SKILL.md +590 -0
- package/.claude/skills/collaborating-with-codex/SKILL.md +174 -0
- package/.claude/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.claude/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.claude/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.claude/skills/crud-development/SKILL.md +649 -0
- package/.claude/skills/data-permission/SKILL.md +599 -0
- package/.claude/skills/database-ops/SKILL.md +407 -0
- package/.claude/skills/error-handler/SKILL.md +371 -0
- package/.claude/skills/file-oss-management/SKILL.md +863 -0
- package/.claude/skills/git-workflow/SKILL.md +375 -0
- package/.claude/skills/json-serialization/SKILL.md +357 -0
- package/.claude/skills/leniu-api-development/SKILL.md +803 -0
- package/.claude/skills/leniu-architecture-design/SKILL.md +598 -0
- package/.claude/skills/leniu-backend-annotations/SKILL.md +664 -0
- package/.claude/skills/leniu-code-patterns/SKILL.md +365 -0
- package/.claude/skills/leniu-crud-development/SKILL.md +1110 -0
- package/.claude/skills/leniu-data-permission/SKILL.md +256 -0
- package/.claude/skills/leniu-database-ops/SKILL.md +426 -0
- package/.claude/skills/leniu-error-handler/SKILL.md +462 -0
- package/.claude/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.claude/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.claude/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.claude/skills/leniu-java-entity/SKILL.md +751 -0
- package/.claude/skills/leniu-java-export/SKILL.md +560 -0
- package/.claude/skills/leniu-java-logging/SKILL.md +832 -0
- package/.claude/skills/leniu-java-mq/SKILL.md +338 -0
- package/.claude/skills/leniu-java-mybatis/SKILL.md +640 -0
- package/.claude/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/.claude/skills/leniu-java-task/SKILL.md +367 -0
- package/.claude/skills/leniu-java-total-line/SKILL.md +195 -0
- package/.claude/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/.claude/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/.claude/skills/leniu-mealtime/SKILL.md +215 -0
- package/.claude/skills/leniu-redis-cache/SKILL.md +316 -0
- package/.claude/skills/leniu-security-guard/SKILL.md +520 -0
- package/.claude/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.claude/skills/openspec-apply-change/SKILL.md +156 -0
- package/.claude/skills/openspec-archive-change/SKILL.md +114 -0
- package/.claude/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.claude/skills/openspec-continue-change/SKILL.md +118 -0
- package/.claude/skills/openspec-explore/SKILL.md +290 -0
- package/.claude/skills/openspec-ff-change/SKILL.md +101 -0
- package/.claude/skills/openspec-new-change/SKILL.md +74 -0
- package/.claude/skills/openspec-onboard/SKILL.md +529 -0
- package/.claude/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.claude/skills/openspec-verify-change/SKILL.md +168 -0
- package/.claude/skills/performance-doctor/SKILL.md +627 -0
- package/.claude/skills/project-navigator/SKILL.md +305 -0
- package/.claude/skills/redis-cache/SKILL.md +839 -0
- package/.claude/skills/scheduled-jobs/SKILL.md +633 -0
- package/.claude/skills/security-guard/SKILL.md +748 -0
- package/.claude/skills/sms-mail/SKILL.md +766 -0
- package/.claude/skills/social-login/SKILL.md +668 -0
- package/.claude/skills/store-pc/SKILL.md +366 -0
- package/.claude/skills/task-tracker/SKILL.md +307 -0
- package/.claude/skills/tech-decision/SKILL.md +393 -0
- package/.claude/skills/tenant-management/SKILL.md +603 -0
- package/.claude/skills/test-development/SKILL.md +755 -0
- package/.claude/skills/ui-pc/SKILL.md +438 -0
- package/.claude/skills/utils-toolkit/SKILL.md +615 -0
- package/.claude/skills/websocket-sse/SKILL.md +716 -0
- package/.claude/skills/workflow-engine/SKILL.md +676 -0
- package/.claude/templates//345/276/205/345/212/236/346/270/205/345/215/225/346/250/241/346/235/277.md +56 -0
- package/.claude/templates//351/234/200/346/261/202/346/226/207/346/241/243/346/250/241/346/235/277.md +85 -0
- package/.claude/templates//351/241/271/347/233/256/347/212/266/346/200/201/346/250/241/346/235/277.md +43 -0
- package/.codex/skills/add-skill/SKILL.md +352 -0
- package/.codex/skills/add-todo/SKILL.md +269 -0
- package/.codex/skills/api-development/SKILL.md +693 -0
- package/.codex/skills/architecture-design/SKILL.md +628 -0
- package/.codex/skills/backend-annotations/SKILL.md +664 -0
- package/.codex/skills/banana-image/CHANGELOG.md +37 -0
- package/.codex/skills/banana-image/README.md +146 -0
- package/.codex/skills/banana-image/SKILL.md +164 -0
- package/.codex/skills/banana-image/assets/logo.png +0 -0
- package/.codex/skills/banana-image/references/advanced-usage.md +189 -0
- package/.codex/skills/banana-image/scripts/apply_template.py +125 -0
- package/.codex/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.codex/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.codex/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.codex/skills/banana-image/scripts/package.json +18 -0
- package/.codex/skills/banana-image/scripts/requirements.txt +10 -0
- package/.codex/skills/banana-image/templates/poster.json +22 -0
- package/.codex/skills/banana-image/templates/product.json +17 -0
- package/.codex/skills/banana-image/templates/social.json +22 -0
- package/.codex/skills/banana-image/templates/thumbnail.json +17 -0
- package/.codex/skills/brainstorm/SKILL.md +648 -0
- package/.codex/skills/bug-detective/SKILL.md +1206 -0
- package/.codex/skills/check/SKILL.md +367 -0
- package/.codex/skills/code-patterns/SKILL.md +442 -0
- package/.codex/skills/collaborating-with-codex/SKILL.md +174 -0
- package/.codex/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.codex/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.codex/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.codex/skills/crud/SKILL.md +265 -0
- package/.codex/skills/crud-development/SKILL.md +637 -0
- package/.codex/skills/data-permission/SKILL.md +591 -0
- package/.codex/skills/database-ops/SKILL.md +553 -0
- package/.codex/skills/dev/SKILL.md +187 -0
- package/.codex/skills/error-handler/SKILL.md +361 -0
- package/.codex/skills/file-oss-management/SKILL.md +863 -0
- package/.codex/skills/git-workflow/SKILL.md +375 -0
- package/.codex/skills/init-docs/SKILL.md +194 -0
- package/.codex/skills/json-serialization/SKILL.md +357 -0
- package/.codex/skills/leniu-api-development/SKILL.md +803 -0
- package/.codex/skills/leniu-architecture-design/SKILL.md +594 -0
- package/.codex/skills/leniu-backend-annotations/SKILL.md +662 -0
- package/.codex/skills/leniu-code-patterns/SKILL.md +365 -0
- package/.codex/skills/leniu-crud-development/SKILL.md +1110 -0
- package/.codex/skills/leniu-data-permission/SKILL.md +256 -0
- package/.codex/skills/leniu-database-ops/SKILL.md +426 -0
- package/.codex/skills/leniu-error-handler/SKILL.md +462 -0
- package/.codex/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.codex/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.codex/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.codex/skills/leniu-java-entity/SKILL.md +751 -0
- package/.codex/skills/leniu-java-export/SKILL.md +560 -0
- package/.codex/skills/leniu-java-logging/SKILL.md +832 -0
- package/.codex/skills/leniu-java-mq/SKILL.md +338 -0
- package/.codex/skills/leniu-java-mybatis/SKILL.md +640 -0
- package/.codex/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/.codex/skills/leniu-java-task/SKILL.md +367 -0
- package/.codex/skills/leniu-java-total-line/SKILL.md +195 -0
- package/.codex/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/.codex/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/.codex/skills/leniu-mealtime/SKILL.md +215 -0
- package/.codex/skills/leniu-redis-cache/SKILL.md +316 -0
- package/.codex/skills/leniu-security-guard/SKILL.md +520 -0
- package/.codex/skills/leniu-utils-toolkit/SKILL.md +378 -0
- package/.codex/skills/next/SKILL.md +137 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +156 -0
- package/.codex/skills/openspec-archive-change/SKILL.md +114 -0
- package/.codex/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.codex/skills/openspec-continue-change/SKILL.md +118 -0
- package/.codex/skills/openspec-explore/SKILL.md +290 -0
- package/.codex/skills/openspec-ff-change/SKILL.md +101 -0
- package/.codex/skills/openspec-new-change/SKILL.md +74 -0
- package/.codex/skills/openspec-onboard/SKILL.md +529 -0
- package/.codex/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.codex/skills/openspec-verify-change/SKILL.md +168 -0
- package/.codex/skills/performance-doctor/SKILL.md +627 -0
- package/.codex/skills/progress/SKILL.md +193 -0
- package/.codex/skills/project-navigator/SKILL.md +286 -0
- package/.codex/skills/redis-cache/SKILL.md +829 -0
- package/.codex/skills/scheduled-jobs/SKILL.md +633 -0
- package/.codex/skills/security-guard/SKILL.md +739 -0
- package/.codex/skills/sms-mail/SKILL.md +766 -0
- package/.codex/skills/social-login/SKILL.md +668 -0
- package/.codex/skills/start/SKILL.md +154 -0
- package/.codex/skills/store-pc/SKILL.md +491 -0
- package/.codex/skills/sync/SKILL.md +149 -0
- package/.codex/skills/task-tracker/SKILL.md +307 -0
- package/.codex/skills/tech-decision/SKILL.md +393 -0
- package/.codex/skills/tenant-management/SKILL.md +603 -0
- package/.codex/skills/test-development/SKILL.md +755 -0
- package/.codex/skills/ui-pc/SKILL.md +475 -0
- package/.codex/skills/update-status/SKILL.md +159 -0
- package/.codex/skills/utils-toolkit/SKILL.md +593 -0
- package/.codex/skills/websocket-sse/SKILL.md +716 -0
- package/.codex/skills/workflow-engine/SKILL.md +676 -0
- package/.cursor/agents/code-reviewer.md +139 -0
- package/.cursor/agents/project-manager.md +159 -0
- package/.cursor/commands/opsx-apply.md +152 -0
- package/.cursor/commands/opsx-archive.md +157 -0
- package/.cursor/commands/opsx-bulk-archive.md +242 -0
- package/.cursor/commands/opsx-continue.md +114 -0
- package/.cursor/commands/opsx-explore.md +174 -0
- package/.cursor/commands/opsx-ff.md +94 -0
- package/.cursor/commands/opsx-new.md +69 -0
- package/.cursor/commands/opsx-onboard.md +525 -0
- package/.cursor/commands/opsx-sync.md +134 -0
- package/.cursor/commands/opsx-verify.md +164 -0
- package/.cursor/mcp.json +22 -0
- package/.cursor/skills/add-skill/SKILL.md +352 -0
- package/.cursor/skills/api-development/SKILL.md +560 -0
- package/.cursor/skills/architecture-design/SKILL.md +756 -0
- package/.cursor/skills/backend-annotations/SKILL.md +674 -0
- package/.cursor/skills/banana-image/CHANGELOG.md +37 -0
- package/.cursor/skills/banana-image/README.md +146 -0
- package/.cursor/skills/banana-image/SKILL.md +164 -0
- package/.cursor/skills/banana-image/assets/logo.png +0 -0
- package/.cursor/skills/banana-image/references/advanced-usage.md +189 -0
- package/.cursor/skills/banana-image/scripts/apply_template.py +125 -0
- package/.cursor/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.cursor/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.cursor/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.cursor/skills/banana-image/scripts/package.json +18 -0
- package/.cursor/skills/banana-image/scripts/requirements.txt +10 -0
- package/.cursor/skills/banana-image/templates/poster.json +22 -0
- package/.cursor/skills/banana-image/templates/product.json +17 -0
- package/.cursor/skills/banana-image/templates/social.json +22 -0
- package/.cursor/skills/banana-image/templates/thumbnail.json +17 -0
- package/.cursor/skills/brainstorm/SKILL.md +648 -0
- package/.cursor/skills/bug-detective/SKILL.md +1206 -0
- package/.cursor/skills/code-patterns/SKILL.md +590 -0
- package/.cursor/skills/collaborating-with-codex/SKILL.md +174 -0
- package/.cursor/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.cursor/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.cursor/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.cursor/skills/crud-development/SKILL.md +649 -0
- package/.cursor/skills/data-permission/SKILL.md +599 -0
- package/.cursor/skills/database-ops/SKILL.md +407 -0
- package/.cursor/skills/error-handler/SKILL.md +371 -0
- package/.cursor/skills/file-oss-management/SKILL.md +863 -0
- package/.cursor/skills/git-workflow/SKILL.md +375 -0
- package/.cursor/skills/json-serialization/SKILL.md +357 -0
- package/.cursor/skills/leniu-api-development/SKILL.md +803 -0
- package/.cursor/skills/leniu-architecture-design/SKILL.md +598 -0
- package/.cursor/skills/leniu-backend-annotations/SKILL.md +664 -0
- package/.cursor/skills/leniu-code-patterns/SKILL.md +365 -0
- package/.cursor/skills/leniu-crud-development/SKILL.md +1110 -0
- package/.cursor/skills/leniu-data-permission/SKILL.md +256 -0
- package/.cursor/skills/leniu-database-ops/SKILL.md +426 -0
- package/.cursor/skills/leniu-error-handler/SKILL.md +462 -0
- package/.cursor/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.cursor/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.cursor/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.cursor/skills/leniu-java-entity/SKILL.md +751 -0
- package/.cursor/skills/leniu-java-export/SKILL.md +560 -0
- package/.cursor/skills/leniu-java-logging/SKILL.md +832 -0
- package/.cursor/skills/leniu-java-mq/SKILL.md +338 -0
- package/.cursor/skills/leniu-java-mybatis/SKILL.md +640 -0
- package/.cursor/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/.cursor/skills/leniu-java-task/SKILL.md +367 -0
- package/.cursor/skills/leniu-java-total-line/SKILL.md +195 -0
- package/.cursor/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/.cursor/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/.cursor/skills/leniu-mealtime/SKILL.md +215 -0
- package/.cursor/skills/leniu-redis-cache/SKILL.md +316 -0
- package/.cursor/skills/leniu-security-guard/SKILL.md +520 -0
- package/.cursor/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +156 -0
- package/.cursor/skills/openspec-archive-change/SKILL.md +114 -0
- package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.cursor/skills/openspec-continue-change/SKILL.md +118 -0
- package/.cursor/skills/openspec-explore/SKILL.md +290 -0
- package/.cursor/skills/openspec-ff-change/SKILL.md +101 -0
- package/.cursor/skills/openspec-new-change/SKILL.md +74 -0
- package/.cursor/skills/openspec-onboard/SKILL.md +529 -0
- package/.cursor/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.cursor/skills/openspec-verify-change/SKILL.md +168 -0
- package/.cursor/skills/performance-doctor/SKILL.md +627 -0
- package/.cursor/skills/project-navigator/SKILL.md +305 -0
- package/.cursor/skills/redis-cache/SKILL.md +839 -0
- package/.cursor/skills/scheduled-jobs/SKILL.md +633 -0
- package/.cursor/skills/security-guard/SKILL.md +748 -0
- package/.cursor/skills/sms-mail/SKILL.md +766 -0
- package/.cursor/skills/social-login/SKILL.md +668 -0
- package/.cursor/skills/store-pc/SKILL.md +366 -0
- package/.cursor/skills/task-tracker/SKILL.md +307 -0
- package/.cursor/skills/tech-decision/SKILL.md +393 -0
- package/.cursor/skills/tenant-management/SKILL.md +603 -0
- package/.cursor/skills/test-development/SKILL.md +755 -0
- package/.cursor/skills/ui-pc/SKILL.md +438 -0
- package/.cursor/skills/utils-toolkit/SKILL.md +615 -0
- package/.cursor/skills/websocket-sse/SKILL.md +716 -0
- package/.cursor/skills/workflow-engine/SKILL.md +676 -0
- package/AGENTS.md +669 -0
- package/CLAUDE.md +205 -0
- package/README.md +205 -0
- package/bin/index.js +179 -0
- package/init.sh +178 -0
- package/package.json +27 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: leniu-utils-toolkit
|
|
3
|
+
description: |
|
|
4
|
+
leniu-yunshitang-core 项目工具类使用指南。包含 BeanUtil、CollUtil、ObjectUtil、StrUtil、RedisUtil、JacksonUtil、LeBeanUtil 等核心工具类。
|
|
5
|
+
|
|
6
|
+
触发场景:
|
|
7
|
+
- 对象转换(DTO/VO/Entity)
|
|
8
|
+
- 字符串处理
|
|
9
|
+
- 集合操作
|
|
10
|
+
- 日期时间处理
|
|
11
|
+
- Redis 缓存操作
|
|
12
|
+
- JSON 序列化
|
|
13
|
+
- 模糊查询处理
|
|
14
|
+
|
|
15
|
+
适用项目:leniu-tengyun-core(云食堂项目)
|
|
16
|
+
|
|
17
|
+
触发词:leniu-工具类、leniu-BeanUtil、leniu-StrUtil、leniu-CollUtil、leniu-ObjectUtil、leniu-RedisUtil、leniu-JacksonUtil、leniu-LeBeanUtil、net.xnzn、leniu-yunshitang、云食堂工具类
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# leniu-yunshitang-core 工具类大全
|
|
22
|
+
|
|
23
|
+
> 本文档专注于 leniu-tengyun-core 项目的 Java 后端工具类。
|
|
24
|
+
|
|
25
|
+
## 快速索引
|
|
26
|
+
|
|
27
|
+
| 功能 | 工具类 | 包路径 | 常用方法 |
|
|
28
|
+
|------|--------|--------|---------|
|
|
29
|
+
| **对象转换** | `BeanUtil` | `cn.hutool.core.bean` | `copyProperties()`, `copyToList()` |
|
|
30
|
+
| 字符串 | `StrUtil` | `cn.hutool.core.util` | `isBlank()`, `format()` |
|
|
31
|
+
| 集合 | `CollUtil` | `cn.hutool.core.collection` | `isEmpty()`, `newArrayList()` |
|
|
32
|
+
| 对象 | `ObjectUtil` | `cn.hutool.core.util` | `isNull()`, `isEmpty()` |
|
|
33
|
+
| Redis缓存 | `RedisUtil` | `net.xnzn.core.base.redis` | `setString()`, `getString()` |
|
|
34
|
+
| JSON | `JacksonUtil` | `net.xnzn.core.common.utils` | `writeValueAsString()`, `readValue()` |
|
|
35
|
+
| 模糊查询 | `LeBeanUtil` | `net.xnzn.core.common.utils` | `fieldLikeHandle()` |
|
|
36
|
+
| 租户上下文 | `TenantContextHolder` | `net.xnzn.framework.data.tenant` | `getTenantId()` |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 1. 对象转换 - BeanUtil(Hutool)
|
|
41
|
+
|
|
42
|
+
> ⚠️ **强制规范**: leniu 项目使用 Hutool 的 `BeanUtil`,不是 MapstructUtils
|
|
43
|
+
|
|
44
|
+
```java
|
|
45
|
+
import cn.hutool.core.bean.BeanUtil;
|
|
46
|
+
|
|
47
|
+
// ✅ 单个对象转换
|
|
48
|
+
XxxVO vo = BeanUtil.copyProperties(entity, XxxVO.class);
|
|
49
|
+
XxxEntity entity = BeanUtil.copyProperties(dto, XxxEntity.class);
|
|
50
|
+
|
|
51
|
+
// ✅ 集合转换
|
|
52
|
+
List<XxxVO> voList = BeanUtil.copyToList(entityList, XxxVO.class);
|
|
53
|
+
List<XxxEntity> entityList = BeanUtil.copyToList(dtoList, XxxEntity.class);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 2. 字符串操作 - StrUtil(Hutool)
|
|
59
|
+
|
|
60
|
+
```java
|
|
61
|
+
import cn.hutool.core.util.StrUtil;
|
|
62
|
+
|
|
63
|
+
// 判空
|
|
64
|
+
StrUtil.isBlank(str); // null / "" / 空白 都返回 true
|
|
65
|
+
StrUtil.isNotBlank(str);
|
|
66
|
+
StrUtil.isEmpty(str); // null / "" 返回 true
|
|
67
|
+
StrUtil.isNotEmpty(str);
|
|
68
|
+
|
|
69
|
+
// 字符串拼接
|
|
70
|
+
String str = StrUtil.join(",", list); // "1,2,3"
|
|
71
|
+
|
|
72
|
+
// 常量
|
|
73
|
+
StrUtil.COMMA // ","
|
|
74
|
+
StrUtil.DOT // "."
|
|
75
|
+
StrUtil.SLASH // "/"
|
|
76
|
+
|
|
77
|
+
// 截取
|
|
78
|
+
String str = StrUtil.sub(s, 0, 10);
|
|
79
|
+
|
|
80
|
+
// 去除前后缀
|
|
81
|
+
StrUtil.removePrefix(str, "prefix_");
|
|
82
|
+
StrUtil.removeSuffix(str, "_suffix");
|
|
83
|
+
|
|
84
|
+
// 判断前后缀
|
|
85
|
+
StrUtil.startWith(str, "prefix_");
|
|
86
|
+
StrUtil.endWith(str, "_suffix");
|
|
87
|
+
|
|
88
|
+
// 大小写转换
|
|
89
|
+
StrUtil.upperCase(str);
|
|
90
|
+
StrUtil.lowerCase(str);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 3. 集合操作 - CollUtil(Hutool)
|
|
96
|
+
|
|
97
|
+
```java
|
|
98
|
+
import cn.hutool.core.collection.CollUtil;
|
|
99
|
+
|
|
100
|
+
// 判空
|
|
101
|
+
CollUtil.isEmpty(list);
|
|
102
|
+
CollUtil.isNotEmpty(list);
|
|
103
|
+
|
|
104
|
+
// 创建集合
|
|
105
|
+
CollUtil.newArrayList(1, 2, 3);
|
|
106
|
+
CollUtil.newHashSet("a", "b");
|
|
107
|
+
|
|
108
|
+
// 集合转数组
|
|
109
|
+
String[] array = CollUtil.toArray(list, String.class);
|
|
110
|
+
|
|
111
|
+
// 集合转字符串
|
|
112
|
+
String str = CollUtil.join(list, ",");
|
|
113
|
+
|
|
114
|
+
// 分割
|
|
115
|
+
List<String> list = CollUtil.split("1,2,3", ",");
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 4. 对象操作 - ObjectUtil(Hutool)
|
|
121
|
+
|
|
122
|
+
```java
|
|
123
|
+
import cn.hutool.core.util.ObjectUtil;
|
|
124
|
+
|
|
125
|
+
// 判空
|
|
126
|
+
ObjectUtil.isNull(obj);
|
|
127
|
+
ObjectUtil.isNotNull(obj);
|
|
128
|
+
ObjectUtil.isEmpty(obj); // null / 空字符串 / 空集合
|
|
129
|
+
ObjectUtil.isNotEmpty(obj);
|
|
130
|
+
|
|
131
|
+
// 默认值
|
|
132
|
+
ObjectUtil.defaultIfNull(obj, defaultValue);
|
|
133
|
+
|
|
134
|
+
// 相等比较
|
|
135
|
+
ObjectUtil.equal(a, b);
|
|
136
|
+
|
|
137
|
+
// 克隆
|
|
138
|
+
ObjectUtil.clone(obj);
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 5. Redis 缓存 - RedisUtil
|
|
144
|
+
|
|
145
|
+
```java
|
|
146
|
+
import net.xnzn.core.base.redis.RedisUtil;
|
|
147
|
+
import org.redisson.api.RLock;
|
|
148
|
+
|
|
149
|
+
// ========== String 操作 ==========
|
|
150
|
+
RedisUtil.setString(key, value); // 存字符串
|
|
151
|
+
RedisUtil.setString(key, value, timeout); // 存字符串(秒)
|
|
152
|
+
RedisUtil.getString(key); // 取字符串
|
|
153
|
+
|
|
154
|
+
// ========== Object 操作 ==========
|
|
155
|
+
RedisUtil.setObj(key, obj); // 存对象
|
|
156
|
+
RedisUtil.setObj(key, obj, timeout); // 存对象(秒)
|
|
157
|
+
RedisUtil.getObj(key); // 取对象
|
|
158
|
+
RedisUtil.getObjOrNull(key); // 取对象(异常返回null)
|
|
159
|
+
|
|
160
|
+
// ========== 删除操作 ==========
|
|
161
|
+
RedisUtil.delete(key); // 删除单个key
|
|
162
|
+
RedisUtil.delete(keys); // 批量删除
|
|
163
|
+
RedisUtil.deleteByPattern("cache:user:*"); // 模式匹配删除
|
|
164
|
+
RedisUtil.deleteKeysInPipeline(keys); // 管道批量删除
|
|
165
|
+
|
|
166
|
+
// ========== 分布式锁 ==========
|
|
167
|
+
RLock lock = RedisUtil.getLock(key); // 获取普通锁
|
|
168
|
+
RLock lock = RedisUtil.getFairLock(key); // 获取公平锁
|
|
169
|
+
RedisUtil.safeUnLock(lock); // 安全解锁
|
|
170
|
+
RedisUtil.isLock(key); // 检查是否锁定
|
|
171
|
+
|
|
172
|
+
// ========== 其他操作 ==========
|
|
173
|
+
RedisUtil.setNx(key, value, expireTime); // SETNX
|
|
174
|
+
RedisUtil.hasKey(key); // 判断key存在
|
|
175
|
+
RedisUtil.incr(key, liveTime); // 自增
|
|
176
|
+
RedisUtil.decr(key, liveTime); // 自减
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 6. JSON 操作 - JacksonUtil
|
|
182
|
+
|
|
183
|
+
```java
|
|
184
|
+
import net.xnzn.core.common.utils.JacksonUtil;
|
|
185
|
+
|
|
186
|
+
// 序列化
|
|
187
|
+
String json = JacksonUtil.writeValueAsString(obj); // 对象->JSON字符串
|
|
188
|
+
String json = JacksonUtil.writeValueAsStringIgnoreNull(obj); // 忽略null字段
|
|
189
|
+
|
|
190
|
+
// 反序列化
|
|
191
|
+
User user = JacksonUtil.readValue(json, User.class); // JSON->对象
|
|
192
|
+
List<User> list = JacksonUtil.readList(json, User.class); // JSON->List
|
|
193
|
+
Map<String, Object> map = JacksonUtil.readValue(json, Map.class);
|
|
194
|
+
|
|
195
|
+
// JsonNode 操作
|
|
196
|
+
JsonNode node = JacksonUtil.readTree(json); // JSON->JsonNode
|
|
197
|
+
User user = JacksonUtil.treeToValue(node, User.class); // JsonNode->对象
|
|
198
|
+
String value = JacksonUtil.getByPath(node, "data.user.name"); // 路径获取
|
|
199
|
+
String str = JacksonUtil.getString(node, "key"); // 取String
|
|
200
|
+
Integer num = JacksonUtil.getInt(node, "key"); // 取Integer
|
|
201
|
+
|
|
202
|
+
// 节点创建
|
|
203
|
+
ObjectNode objectNode = JacksonUtil.objectNode(); // 创建ObjectNode
|
|
204
|
+
ArrayNode arrayNode = JacksonUtil.arrayNode(); // 创建ArrayNode
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 7. 模糊查询处理 - LeBeanUtil
|
|
210
|
+
|
|
211
|
+
```java
|
|
212
|
+
import net.xnzn.core.common.utils.LeBeanUtil;
|
|
213
|
+
|
|
214
|
+
// 字段模糊查询处理(自动添加 %前后缀)
|
|
215
|
+
param.setName(LeBeanUtil.fieldLikeHandle(param.getName()));
|
|
216
|
+
// 效果: "张" -> "%张%"
|
|
217
|
+
|
|
218
|
+
// 常用于 Service 层查询条件处理
|
|
219
|
+
param.setCanteenName(LeBeanUtil.fieldLikeHandle(param.getCanteenName()));
|
|
220
|
+
param.setStallName(LeBeanUtil.fieldLikeHandle(param.getStallName()));
|
|
221
|
+
param.setDishName(LeBeanUtil.fieldLikeHandle(param.getDishName()));
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 8. 租户上下文 - TenantContextHolder
|
|
227
|
+
|
|
228
|
+
```java
|
|
229
|
+
import net.xnzn.framework.data.tenant.TenantContextHolder;
|
|
230
|
+
|
|
231
|
+
// 获取当前租户ID
|
|
232
|
+
Long tenantId = TenantContextHolder.getTenantId();
|
|
233
|
+
|
|
234
|
+
// 常用于 Redis key 构建
|
|
235
|
+
String key = "cache:" + TenantContextHolder.getTenantId() + ":data";
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 9. 日期时间工具
|
|
241
|
+
|
|
242
|
+
```java
|
|
243
|
+
import java.time.LocalDateTime;
|
|
244
|
+
import java.time.format.DateTimeFormatter;
|
|
245
|
+
|
|
246
|
+
// 当前时间
|
|
247
|
+
LocalDateTime now = LocalDateTime.now();
|
|
248
|
+
|
|
249
|
+
// 格式化
|
|
250
|
+
String format = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
251
|
+
|
|
252
|
+
// 解析
|
|
253
|
+
LocalDateTime time = LocalDateTime.parse(str, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 10. 常用正则表达式
|
|
259
|
+
|
|
260
|
+
```java
|
|
261
|
+
// 手机号
|
|
262
|
+
String phoneReg = "^1[3-9]\\d{9}$";
|
|
263
|
+
|
|
264
|
+
// 邮箱
|
|
265
|
+
String emailReg = "^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$";
|
|
266
|
+
|
|
267
|
+
// 身份证
|
|
268
|
+
String idCardReg = "^[1-9]\\d{5}(19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$";
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 工具类选择速查
|
|
274
|
+
|
|
275
|
+
| 需求 | 推荐工具 | 说明 |
|
|
276
|
+
|------|---------|------|
|
|
277
|
+
| 对象转换 | `BeanUtil.copyProperties()` | **leniu 必用** |
|
|
278
|
+
| 集合判空 | `CollUtil.isEmpty()` | Hutool |
|
|
279
|
+
| 对象判空 | `ObjectUtil.isNull()` | Hutool |
|
|
280
|
+
| 字符串判空 | `StrUtil.isBlank()` | Hutool |
|
|
281
|
+
| JSON序列化 | `JacksonUtil.writeValueAsString()` | leniu |
|
|
282
|
+
| Redis缓存 | `RedisUtil.setString()` | leniu |
|
|
283
|
+
| 模糊查询 | `LeBeanUtil.fieldLikeHandle()` | leniu |
|
|
284
|
+
| 租户ID | `TenantContextHolder.getTenantId()` | leniu |
|
|
285
|
+
| 字符串拼接 | `StrUtil.join()` | Hutool |
|
|
286
|
+
| 日期格式化 | `DateTimeFormatter` | JDK 8 |
|
|
287
|
+
| ID 生成 | `IdUtil.getSnowflakeNextId()` | Hutool |
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## 禁止事项
|
|
292
|
+
|
|
293
|
+
```java
|
|
294
|
+
// ❌ 禁止使用 MapstructUtils(leniu 使用 BeanUtil)
|
|
295
|
+
// MapstructUtils.convert(source, Target.class); // 禁止!
|
|
296
|
+
|
|
297
|
+
// ❌ 禁止使用 Map 传递业务数据
|
|
298
|
+
public Map<String, Object> getXxx() { ... } // 禁止!
|
|
299
|
+
|
|
300
|
+
// ❌ 禁止手写 stream 转换(应使用 BeanUtil.copyToList)
|
|
301
|
+
list.stream().map(item -> BeanUtil.copyProperties(item, XxxVO.class)).collect(Collectors.toList());
|
|
302
|
+
// ✅ 推荐
|
|
303
|
+
BeanUtil.copyToList(list, XxxVO.class);
|
|
304
|
+
|
|
305
|
+
// ❌ 禁止使用完整类型引用
|
|
306
|
+
public net.xnzn.core.common.util.LeResponse<XxxVo> getXxx() // 禁止!
|
|
307
|
+
// ✅ 正确:先 import,再使用短类名
|
|
308
|
+
import net.xnzn.core.common.util.LeResponse;
|
|
309
|
+
public LeResponse<XxxVo> getXxx()
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## 常见错误对比
|
|
315
|
+
|
|
316
|
+
### ❌ 错误写法
|
|
317
|
+
|
|
318
|
+
```java
|
|
319
|
+
// 错误 1: 使用 RuoYi 的 MapstructUtils
|
|
320
|
+
MapstructUtils.convert(source, Target.class); // ❌ leniu 用 BeanUtil
|
|
321
|
+
|
|
322
|
+
// 错误 2: 使用 RuoYi 的 StringUtils
|
|
323
|
+
StringUtils.isBlank(str); // ❌ leniu 用 StrUtil
|
|
324
|
+
|
|
325
|
+
// 错误 3: 使用 RuoYi 的 RedisUtils
|
|
326
|
+
RedisUtils.setCacheObject(key, value); // ❌ leniu 用 RedisUtil
|
|
327
|
+
|
|
328
|
+
// 错误 4: 使用 RuoYi 的 JsonUtils
|
|
329
|
+
JsonUtils.toJsonString(obj); // ❌ leniu 用 JacksonUtil
|
|
330
|
+
|
|
331
|
+
// 错误 5: 使用 RuoYi 的 TenantHelper
|
|
332
|
+
TenantHelper.getTenantId(); // ❌ leniu 用 TenantContextHolder
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### ✅ 正确写法
|
|
336
|
+
|
|
337
|
+
```java
|
|
338
|
+
// 正确 1: 使用 leniu 的 BeanUtil
|
|
339
|
+
BeanUtil.copyProperties(source, Target.class); // ✅
|
|
340
|
+
|
|
341
|
+
// 正确 2: 使用 Hutool 的 StrUtil
|
|
342
|
+
StrUtil.isBlank(str); // ✅
|
|
343
|
+
|
|
344
|
+
// 正确 3: 使用 leniu 的 RedisUtil
|
|
345
|
+
RedisUtil.setString(key, value); // ✅
|
|
346
|
+
|
|
347
|
+
// 正确 4: 使用 leniu 的 JacksonUtil
|
|
348
|
+
JacksonUtil.writeValueAsString(obj); // ✅
|
|
349
|
+
|
|
350
|
+
// 正确 5: 使用 leniu 的 TenantContextHolder
|
|
351
|
+
TenantContextHolder.getTenantId(); // ✅
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## 工具类选择决策
|
|
357
|
+
|
|
358
|
+
| 场景 | RuoYi-Vue-Plus | leniu-tengyun-core |
|
|
359
|
+
|------|----------------|-------------------|
|
|
360
|
+
| 对象转换 | `MapstructUtils.convert()` | `BeanUtil.copyProperties()` |
|
|
361
|
+
| 集合判空 | `CollUtil.isEmpty()` | `CollUtil.isEmpty()` |
|
|
362
|
+
| 对象判空 | `ObjectUtil.isNull()` | `ObjectUtil.isNull()` |
|
|
363
|
+
| 字符串判空 | `StringUtils.isBlank()` | `StrUtil.isBlank()` |
|
|
364
|
+
| JSON序列化 | `JsonUtils.toJsonString()` | `JacksonUtil.writeValueAsString()` |
|
|
365
|
+
| Redis缓存 | `RedisUtils.setCacheObject()` | `RedisUtil.setString()` |
|
|
366
|
+
| 模糊查询 | `"%" + keyword + "%"` | `LeBeanUtil.fieldLikeHandle()` |
|
|
367
|
+
| 租户ID | `LoginHelper.getTenantId()` | `TenantContextHolder.getTenantId()` |
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## 相关技能
|
|
372
|
+
|
|
373
|
+
| 需要了解 | 激活 Skill |
|
|
374
|
+
|---------|-----------|
|
|
375
|
+
| Entity/VO/DTO 设计 | `leniu-java-entity` |
|
|
376
|
+
| MyBatis 使用 | `leniu-java-mybatis` |
|
|
377
|
+
| 异常处理 | `leniu-error-handler` |
|
|
378
|
+
| 数据库设计 | `leniu-database-ops` |
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: next
|
|
3
|
+
description: |
|
|
4
|
+
当需要获取项目开发的下一步建议、规划开发方向时自动使用此 Skill。
|
|
5
|
+
|
|
6
|
+
触发场景:
|
|
7
|
+
- 不知道下一步应该做什么
|
|
8
|
+
- 需要获取开发优先级建议
|
|
9
|
+
- 需要分析当前项目状态并给出建议
|
|
10
|
+
- 需要规划开发工作方向
|
|
11
|
+
|
|
12
|
+
触发词:下一步、next、建议、做什么、开发方向、优先级、工作建议、开发建议
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# /next - 下一步建议
|
|
16
|
+
|
|
17
|
+
作为项目开发顾问,根据当前项目状态,为您建议下一步应该做什么。
|
|
18
|
+
|
|
19
|
+
## 🎯 执行流程
|
|
20
|
+
|
|
21
|
+
### 第一步:快速扫描项目状态
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# 查看最近 Git 提交记录
|
|
25
|
+
git log -5 --oneline
|
|
26
|
+
|
|
27
|
+
# 扫描所有业务模块中的 TODO/FIXME
|
|
28
|
+
Grep pattern: "TODO:|FIXME:" path: ruoyi-modules/ glob: "*.java" output_mode: content -B 2
|
|
29
|
+
|
|
30
|
+
# 检查代码规范和问题
|
|
31
|
+
Grep pattern: "package com\.ruoyi\.|BeanUtil\.copy" path: ruoyi-modules/ glob: "*.java" output_mode: files_with_matches
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 第二步:分析开发阶段
|
|
35
|
+
|
|
36
|
+
| 阶段 | 特征 | 功能完成率 |
|
|
37
|
+
|------|------|----------|
|
|
38
|
+
| 🟢 初期 | 基础框架搭建,功能模块较少 | < 30% |
|
|
39
|
+
| 🟡 中期 | 核心功能开发中,模块逐步完善 | 30-70% |
|
|
40
|
+
| 🔴 后期 | 功能基本完成,处于优化阶段 | > 70% |
|
|
41
|
+
|
|
42
|
+
### 第三步:分类问题和建议
|
|
43
|
+
|
|
44
|
+
- **紧急问题**:安全漏洞、严重 Bug、编译错误
|
|
45
|
+
- **重要问题**:功能缺陷、设计问题、规范问题
|
|
46
|
+
- **优化建议**:性能优化、代码重构、文档完善
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 📊 输出格式
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
# 🎯 下一步建议
|
|
54
|
+
|
|
55
|
+
**分析时间**:YYYY-MM-DD HH:mm
|
|
56
|
+
**分析范围**:全量后端代码
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 📌 当前状态
|
|
61
|
+
|
|
62
|
+
### Git 提交分析
|
|
63
|
+
- **最近一次提交**:[commit message] ([commit hash])
|
|
64
|
+
- **最近在做**:[根据提交记录推断]
|
|
65
|
+
- **提交频率**:[活跃/不活跃]
|
|
66
|
+
|
|
67
|
+
### 代码状态
|
|
68
|
+
- **开发阶段**:🟡 中期(核心功能开发中)
|
|
69
|
+
- **代码质量**:良好(无 com.ruoyi 包名问题)
|
|
70
|
+
- **规范问题**:3 个接口缺少 @SaCheckPermission 注解
|
|
71
|
+
|
|
72
|
+
### 代码待办统计
|
|
73
|
+
- **TODO 项**:X 个
|
|
74
|
+
- **FIXME 项**:X 个
|
|
75
|
+
- **编译/运行错误**:无
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 🚀 建议优先级
|
|
80
|
+
|
|
81
|
+
### 🔴 高优先级(必须立即处理)
|
|
82
|
+
|
|
83
|
+
1. **修复 FIXME 问题**
|
|
84
|
+
- 位置:ruoyi-demo/PaymentService.java:156
|
|
85
|
+
- 问题:退款金额计算错误
|
|
86
|
+
- **快速修复**:`/check` 找出所有 FIXME 并逐一解决
|
|
87
|
+
|
|
88
|
+
2. **补充缺失的权限注解**
|
|
89
|
+
- 位置:ruoyi-demo 模块 3 个接口
|
|
90
|
+
- **快速修复**:`/check demo` 查出所有问题接口
|
|
91
|
+
|
|
92
|
+
### 🟡 中优先级(近期应该做)
|
|
93
|
+
|
|
94
|
+
1. **补充缺失功能模块**
|
|
95
|
+
- **快速开发**:`/crud Payment` 快速生成 CRUD 代码
|
|
96
|
+
|
|
97
|
+
2. **优化 Service 查询层**
|
|
98
|
+
- **参考代码**:ruoyi-system/SysNoticeServiceImpl.java
|
|
99
|
+
|
|
100
|
+
### 🟢 低优先级(可以考虑)
|
|
101
|
+
|
|
102
|
+
1. **性能优化**
|
|
103
|
+
2. **代码重构**
|
|
104
|
+
3. **单元测试**
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 💡 具体行动建议
|
|
109
|
+
|
|
110
|
+
### 如果您想继续开发新功能:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
/crud Payment # 快速生成 Payment 模块
|
|
114
|
+
/check business # 检查并修复规范问题
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 如果您想优化代码质量:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
/check # 全量检查
|
|
121
|
+
/check business # 按模块检查
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🔗 相关命令
|
|
127
|
+
|
|
128
|
+
| 命令 | 用途 | 何时使用 |
|
|
129
|
+
|------|------|---------|
|
|
130
|
+
| `/start` | 快速了解项目 | 初次接触项目 |
|
|
131
|
+
| `/check` | 代码规范检查 | 开发完成后、定期检查 |
|
|
132
|
+
| `/progress` | 查看项目进度 | 了解完成情况 |
|
|
133
|
+
| `/next` | 获取建议 | 不知道下一步做什么 |
|
|
134
|
+
| `/dev` | 开发新功能 | 从零开始开发 |
|
|
135
|
+
| `/crud` | 快速生成代码 | 表已存在时 |
|
|
136
|
+
| `/add-todo` | 添加待办任务 | 跟踪任务 |
|
|
137
|
+
```
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-apply-change
|
|
3
|
+
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.1.1"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Implement tasks from an OpenSpec change.
|
|
13
|
+
|
|
14
|
+
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
|
+
|
|
16
|
+
**Steps**
|
|
17
|
+
|
|
18
|
+
1. **Select the change**
|
|
19
|
+
|
|
20
|
+
If a name is provided, use it. Otherwise:
|
|
21
|
+
- Infer from conversation context if the user mentioned a change
|
|
22
|
+
- Auto-select if only one active change exists
|
|
23
|
+
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
|
|
24
|
+
|
|
25
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
|
|
26
|
+
|
|
27
|
+
2. **Check status to understand the schema**
|
|
28
|
+
```bash
|
|
29
|
+
openspec status --change "<name>" --json
|
|
30
|
+
```
|
|
31
|
+
Parse the JSON to understand:
|
|
32
|
+
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
33
|
+
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
34
|
+
|
|
35
|
+
3. **Get apply instructions**
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
openspec instructions apply --change "<name>" --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This returns:
|
|
42
|
+
- Context file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
|
43
|
+
- Progress (total, complete, remaining)
|
|
44
|
+
- Task list with status
|
|
45
|
+
- Dynamic instruction based on current state
|
|
46
|
+
|
|
47
|
+
**Handle states:**
|
|
48
|
+
- If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
|
|
49
|
+
- If `state: "all_done"`: congratulate, suggest archive
|
|
50
|
+
- Otherwise: proceed to implementation
|
|
51
|
+
|
|
52
|
+
4. **Read context files**
|
|
53
|
+
|
|
54
|
+
Read the files listed in `contextFiles` from the apply instructions output.
|
|
55
|
+
The files depend on the schema being used:
|
|
56
|
+
- **spec-driven**: proposal, specs, design, tasks
|
|
57
|
+
- Other schemas: follow the contextFiles from CLI output
|
|
58
|
+
|
|
59
|
+
5. **Show current progress**
|
|
60
|
+
|
|
61
|
+
Display:
|
|
62
|
+
- Schema being used
|
|
63
|
+
- Progress: "N/M tasks complete"
|
|
64
|
+
- Remaining tasks overview
|
|
65
|
+
- Dynamic instruction from CLI
|
|
66
|
+
|
|
67
|
+
6. **Implement tasks (loop until done or blocked)**
|
|
68
|
+
|
|
69
|
+
For each pending task:
|
|
70
|
+
- Show which task is being worked on
|
|
71
|
+
- Make the code changes required
|
|
72
|
+
- Keep changes minimal and focused
|
|
73
|
+
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
|
|
74
|
+
- Continue to next task
|
|
75
|
+
|
|
76
|
+
**Pause if:**
|
|
77
|
+
- Task is unclear → ask for clarification
|
|
78
|
+
- Implementation reveals a design issue → suggest updating artifacts
|
|
79
|
+
- Error or blocker encountered → report and wait for guidance
|
|
80
|
+
- User interrupts
|
|
81
|
+
|
|
82
|
+
7. **On completion or pause, show status**
|
|
83
|
+
|
|
84
|
+
Display:
|
|
85
|
+
- Tasks completed this session
|
|
86
|
+
- Overall progress: "N/M tasks complete"
|
|
87
|
+
- If all done: suggest archive
|
|
88
|
+
- If paused: explain why and wait for guidance
|
|
89
|
+
|
|
90
|
+
**Output During Implementation**
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
## Implementing: <change-name> (schema: <schema-name>)
|
|
94
|
+
|
|
95
|
+
Working on task 3/7: <task description>
|
|
96
|
+
[...implementation happening...]
|
|
97
|
+
✓ Task complete
|
|
98
|
+
|
|
99
|
+
Working on task 4/7: <task description>
|
|
100
|
+
[...implementation happening...]
|
|
101
|
+
✓ Task complete
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Output On Completion**
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
## Implementation Complete
|
|
108
|
+
|
|
109
|
+
**Change:** <change-name>
|
|
110
|
+
**Schema:** <schema-name>
|
|
111
|
+
**Progress:** 7/7 tasks complete ✓
|
|
112
|
+
|
|
113
|
+
### Completed This Session
|
|
114
|
+
- [x] Task 1
|
|
115
|
+
- [x] Task 2
|
|
116
|
+
...
|
|
117
|
+
|
|
118
|
+
All tasks complete! Ready to archive this change.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Output On Pause (Issue Encountered)**
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
## Implementation Paused
|
|
125
|
+
|
|
126
|
+
**Change:** <change-name>
|
|
127
|
+
**Schema:** <schema-name>
|
|
128
|
+
**Progress:** 4/7 tasks complete
|
|
129
|
+
|
|
130
|
+
### Issue Encountered
|
|
131
|
+
<description of the issue>
|
|
132
|
+
|
|
133
|
+
**Options:**
|
|
134
|
+
1. <option 1>
|
|
135
|
+
2. <option 2>
|
|
136
|
+
3. Other approach
|
|
137
|
+
|
|
138
|
+
What would you like to do?
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Guardrails**
|
|
142
|
+
- Keep going through tasks until done or blocked
|
|
143
|
+
- Always read context files before starting (from the apply instructions output)
|
|
144
|
+
- If task is ambiguous, pause and ask before implementing
|
|
145
|
+
- If implementation reveals issues, pause and suggest artifact updates
|
|
146
|
+
- Keep code changes minimal and scoped to each task
|
|
147
|
+
- Update task checkbox immediately after completing each task
|
|
148
|
+
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
149
|
+
- Use contextFiles from CLI output, don't assume specific file names
|
|
150
|
+
|
|
151
|
+
**Fluid Workflow Integration**
|
|
152
|
+
|
|
153
|
+
This skill supports the "actions on a change" model:
|
|
154
|
+
|
|
155
|
+
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
156
|
+
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|