leniu-dev 2.0.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/auto-test-generator.md +315 -0
- package/.claude/agents/bug-analyzer.md +103 -0
- package/.claude/agents/code-reviewer.md +122 -0
- package/.claude/agents/code-scanner.md +145 -0
- package/.claude/agents/image-reader.md +154 -0
- package/.claude/agents/loki-runner.md +80 -0
- package/.claude/agents/mysql-runner.md +81 -0
- package/.claude/agents/project-manager.md +159 -0
- package/.claude/agents/requirements-analyzer.md +175 -0
- package/.claude/agents/task-fetcher.md +75 -0
- package/.claude/audio/completed.wav +0 -0
- package/.claude/commands/add-todo.md +255 -0
- package/.claude/commands/auto-test.md +252 -0
- package/.claude/commands/check.md +210 -0
- package/.claude/commands/crud.md +454 -0
- package/.claude/commands/dev.md +532 -0
- package/.claude/commands/init-config.md +154 -0
- package/.claude/commands/init-docs.md +681 -0
- package/.claude/commands/next.md +281 -0
- package/.claude/commands/opsx-apply.md +147 -0
- package/.claude/commands/opsx-archive.md +105 -0
- package/.claude/commands/opsx-bulk-archive.md +237 -0
- package/.claude/commands/opsx-continue.md +109 -0
- package/.claude/commands/opsx-explore.md +281 -0
- package/.claude/commands/opsx-ff.md +92 -0
- package/.claude/commands/opsx-new.md +65 -0
- package/.claude/commands/opsx-onboard.md +397 -0
- package/.claude/commands/opsx-sync.md +129 -0
- package/.claude/commands/opsx-verify.md +159 -0
- package/.claude/commands/progress.md +264 -0
- package/.claude/commands/release.md +109 -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/lib/notify.js +310 -0
- package/.claude/hooks/pre-tool-use.js +117 -0
- package/.claude/hooks/skill-forced-eval.js +161 -0
- package/.claude/hooks/stop.js +55 -0
- package/.claude/notify-config.json +9 -0
- package/.claude/settings.json +57 -0
- package/.claude/skills/add-skill/SKILL.md +488 -0
- package/.claude/skills/analyze-requirements/SKILL.md +112 -0
- package/.claude/skills/api-development/SKILL.md +315 -0
- package/.claude/skills/architecture-design/SKILL.md +152 -0
- package/.claude/skills/auto-test/SKILL.md +625 -0
- package/.claude/skills/auto-test/references/api-conventions.md +260 -0
- package/.claude/skills/backend-annotations/SKILL.md +248 -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 +171 -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 +216 -0
- package/.claude/skills/bug-detective/SKILL.md +295 -0
- package/.claude/skills/bug-detective/references/error-patterns.md +242 -0
- package/.claude/skills/chrome-cdp/SKILL.md +81 -0
- package/.claude/skills/chrome-cdp/scripts/cdp.mjs +838 -0
- package/.claude/skills/chrome-cdp/scripts/run-cdp.sh +7 -0
- package/.claude/skills/code-patterns/SKILL.md +163 -0
- package/.claude/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.claude/skills/codex-code-review/SKILL.md +327 -0
- package/.claude/skills/collaborating-with-codex/SKILL.md +180 -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 +328 -0
- package/.claude/skills/data-permission/SKILL.md +221 -0
- package/.claude/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.claude/skills/database-ops/SKILL.md +210 -0
- package/.claude/skills/error-handler/SKILL.md +310 -0
- package/.claude/skills/file-oss-management/SKILL.md +260 -0
- package/.claude/skills/file-oss-management/references/entities.md +105 -0
- package/.claude/skills/file-oss-management/references/service-impl.md +104 -0
- package/.claude/skills/fix-bug/SKILL.md +269 -0
- package/.claude/skills/git-workflow/SKILL.md +179 -0
- package/.claude/skills/jenkins-deploy/SKILL.md +134 -0
- package/.claude/skills/jenkins-deploy/assets/env_param.template.json +51 -0
- package/.claude/skills/jenkins-deploy/assets/jk_build.py +400 -0
- package/.claude/skills/json-serialization/SKILL.md +341 -0
- package/.claude/skills/lanhu-design/SKILL.md +99 -0
- package/.claude/skills/leniu-api-development/SKILL.md +319 -0
- package/.claude/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.claude/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.claude/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.claude/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.claude/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.claude/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.claude/skills/leniu-crud-development/SKILL.md +404 -0
- package/.claude/skills/leniu-crud-development/references/templates.md +597 -0
- package/.claude/skills/leniu-customization-location/SKILL.md +410 -0
- package/.claude/skills/leniu-data-permission/SKILL.md +341 -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-concurrent/SKILL.md +400 -0
- package/.claude/skills/leniu-java-entity/SKILL.md +237 -0
- package/.claude/skills/leniu-java-entity/references/templates.md +237 -0
- package/.claude/skills/leniu-java-logging/SKILL.md +229 -0
- package/.claude/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.claude/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.claude/skills/leniu-java-mq/SKILL.md +338 -0
- package/.claude/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.claude/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.claude/skills/leniu-java-task/SKILL.md +367 -0
- package/.claude/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.claude/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.claude/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.claude/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.claude/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.claude/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.claude/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.claude/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.claude/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.claude/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.claude/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.claude/skills/leniu-report-scenario/references/export.md +553 -0
- package/.claude/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.claude/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.claude/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.claude/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.claude/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.claude/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.claude/skills/leniu-security-guard/SKILL.md +306 -0
- package/.claude/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.claude/skills/loki-log-query/SKILL.md +430 -0
- package/.claude/skills/mysql-debug/SKILL.md +406 -0
- package/.claude/skills/performance-doctor/SKILL.md +297 -0
- package/.claude/skills/project-navigator/SKILL.md +211 -0
- package/.claude/skills/redis-cache/SKILL.md +282 -0
- package/.claude/skills/redis-cache/references/listeners.md +23 -0
- package/.claude/skills/scheduled-jobs/SKILL.md +277 -0
- package/.claude/skills/security-guard/SKILL.md +245 -0
- package/.claude/skills/security-guard/references/encrypt-config.md +103 -0
- package/.claude/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.claude/skills/sms-mail/SKILL.md +346 -0
- package/.claude/skills/sms-mail/references/mail-config.md +88 -0
- package/.claude/skills/sms-mail/references/sms-config.md +74 -0
- package/.claude/skills/social-login/SKILL.md +328 -0
- package/.claude/skills/social-login/references/provider-configs.md +118 -0
- package/.claude/skills/store-pc/SKILL.md +366 -0
- package/.claude/skills/sync-back-merge/SKILL.md +66 -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 +272 -0
- package/.claude/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.claude/skills/test-development/SKILL.md +301 -0
- package/.claude/skills/test-development/references/parameterized-examples.md +119 -0
- package/.claude/skills/ui-pc/SKILL.md +438 -0
- package/.claude/skills/utils-toolkit/SKILL.md +354 -0
- package/.claude/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.claude/skills/websocket-sse/SKILL.md +350 -0
- package/.claude/skills/workflow-engine/SKILL.md +249 -0
- package/.claude/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.claude/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.claude/templates/env-config.md +27 -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 +488 -0
- package/.codex/skills/add-todo/SKILL.md +269 -0
- package/.codex/skills/analyze-requirements/SKILL.md +112 -0
- package/.codex/skills/api-development/SKILL.md +315 -0
- package/.codex/skills/architecture-design/SKILL.md +152 -0
- package/.codex/skills/auto-test/SKILL.md +453 -0
- package/.codex/skills/auto-test/references/api-conventions.md +260 -0
- package/.codex/skills/backend-annotations/SKILL.md +248 -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 +171 -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 +216 -0
- package/.codex/skills/bug-detective/SKILL.md +295 -0
- package/.codex/skills/bug-detective/references/error-patterns.md +242 -0
- package/.codex/skills/check/SKILL.md +367 -0
- package/.codex/skills/code-patterns/SKILL.md +163 -0
- package/.codex/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.codex/skills/collaborating-with-codex/SKILL.md +180 -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 +328 -0
- package/.codex/skills/data-permission/SKILL.md +221 -0
- package/.codex/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.codex/skills/database-ops/SKILL.md +210 -0
- package/.codex/skills/dev/SKILL.md +187 -0
- package/.codex/skills/error-handler/SKILL.md +310 -0
- package/.codex/skills/file-oss-management/SKILL.md +260 -0
- package/.codex/skills/file-oss-management/references/entities.md +105 -0
- package/.codex/skills/file-oss-management/references/service-impl.md +104 -0
- package/.codex/skills/fix-bug/SKILL.md +269 -0
- package/.codex/skills/git-workflow/SKILL.md +179 -0
- package/.codex/skills/init-docs/SKILL.md +194 -0
- package/.codex/skills/jenkins-deploy/SKILL.md +134 -0
- package/.codex/skills/json-serialization/SKILL.md +341 -0
- package/.codex/skills/lanhu-design/SKILL.md +99 -0
- package/.codex/skills/leniu-api-development/SKILL.md +319 -0
- package/.codex/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.codex/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.codex/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.codex/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.codex/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.codex/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.codex/skills/leniu-crud-development/SKILL.md +404 -0
- package/.codex/skills/leniu-crud-development/references/templates.md +597 -0
- package/.codex/skills/leniu-customization-location/SKILL.md +410 -0
- package/.codex/skills/leniu-data-permission/SKILL.md +341 -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 +237 -0
- package/.codex/skills/leniu-java-entity/references/templates.md +237 -0
- package/.codex/skills/leniu-java-logging/SKILL.md +229 -0
- package/.codex/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.codex/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.codex/skills/leniu-java-mq/SKILL.md +338 -0
- package/.codex/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.codex/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.codex/skills/leniu-java-task/SKILL.md +367 -0
- package/.codex/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.codex/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.codex/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.codex/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.codex/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.codex/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.codex/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.codex/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.codex/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.codex/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.codex/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.codex/skills/leniu-report-scenario/references/export.md +553 -0
- package/.codex/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.codex/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.codex/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.codex/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.codex/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.codex/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.codex/skills/leniu-security-guard/SKILL.md +306 -0
- package/.codex/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.codex/skills/loki-log-query/SKILL.md +430 -0
- package/.codex/skills/loki-log-query/environments.json +45 -0
- package/.codex/skills/mysql-debug/SKILL.md +406 -0
- package/.codex/skills/next/SKILL.md +137 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +165 -0
- package/.codex/skills/openspec-archive-change/SKILL.md +122 -0
- package/.codex/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.codex/skills/openspec-continue-change/SKILL.md +126 -0
- package/.codex/skills/openspec-explore/SKILL.md +299 -0
- package/.codex/skills/openspec-ff-change/SKILL.md +109 -0
- package/.codex/skills/openspec-new-change/SKILL.md +82 -0
- package/.codex/skills/openspec-onboard/SKILL.md +414 -0
- package/.codex/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.codex/skills/openspec-verify-change/SKILL.md +176 -0
- package/.codex/skills/performance-doctor/SKILL.md +297 -0
- package/.codex/skills/progress/SKILL.md +193 -0
- package/.codex/skills/project-navigator/SKILL.md +211 -0
- package/.codex/skills/redis-cache/SKILL.md +282 -0
- package/.codex/skills/redis-cache/references/listeners.md +23 -0
- package/.codex/skills/scheduled-jobs/SKILL.md +277 -0
- package/.codex/skills/security-guard/SKILL.md +245 -0
- package/.codex/skills/security-guard/references/encrypt-config.md +103 -0
- package/.codex/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.codex/skills/skill-creator/LICENSE.txt +202 -0
- package/.codex/skills/skill-creator/SKILL.md +479 -0
- package/.codex/skills/skill-creator/agents/analyzer.md +274 -0
- package/.codex/skills/skill-creator/agents/comparator.md +202 -0
- package/.codex/skills/skill-creator/agents/grader.md +223 -0
- package/.codex/skills/skill-creator/assets/eval_review.html +146 -0
- package/.codex/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.codex/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.codex/skills/skill-creator/references/schemas.md +430 -0
- package/.codex/skills/skill-creator/scripts/__init__.py +0 -0
- package/.codex/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.codex/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.codex/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.codex/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.codex/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.codex/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.codex/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.codex/skills/skill-creator/scripts/utils.py +47 -0
- package/.codex/skills/sms-mail/SKILL.md +346 -0
- package/.codex/skills/sms-mail/references/mail-config.md +88 -0
- package/.codex/skills/sms-mail/references/sms-config.md +74 -0
- package/.codex/skills/social-login/SKILL.md +328 -0
- package/.codex/skills/social-login/references/provider-configs.md +118 -0
- package/.codex/skills/start/SKILL.md +154 -0
- package/.codex/skills/store-pc/SKILL.md +366 -0
- package/.codex/skills/sync/SKILL.md +149 -0
- package/.codex/skills/sync-back-merge/SKILL.md +66 -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 +272 -0
- package/.codex/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.codex/skills/test-development/SKILL.md +301 -0
- package/.codex/skills/test-development/references/parameterized-examples.md +119 -0
- package/.codex/skills/ui-pc/SKILL.md +438 -0
- package/.codex/skills/update-status/SKILL.md +159 -0
- package/.codex/skills/utils-toolkit/SKILL.md +354 -0
- package/.codex/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.codex/skills/websocket-sse/SKILL.md +350 -0
- package/.codex/skills/workflow-engine/SKILL.md +249 -0
- package/.codex/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.codex/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/agents/bug-analyzer.md +102 -0
- package/.cursor/agents/code-reviewer.md +122 -0
- package/.cursor/agents/code-scanner.md +145 -0
- package/.cursor/agents/image-reader.md +154 -0
- package/.cursor/agents/loki-runner.md +80 -0
- package/.cursor/agents/mysql-runner.md +81 -0
- package/.cursor/agents/project-manager.md +159 -0
- package/.cursor/agents/requirements-analyzer.md +141 -0
- package/.cursor/agents/task-fetcher.md +75 -0
- package/.cursor/audio/completed.wav +0 -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/hooks/cursor-pre-tool-use.js +122 -0
- package/.cursor/hooks/cursor-skill-eval.js +466 -0
- package/.cursor/hooks/lib/notify.js +310 -0
- package/.cursor/hooks/stop.js +55 -0
- package/.cursor/hooks.json +23 -0
- package/.cursor/mcp.json +22 -0
- package/.cursor/rules/skill-activation.mdc +99 -0
- package/.cursor/skills/add-skill/SKILL.md +488 -0
- package/.cursor/skills/analyze-requirements/SKILL.md +112 -0
- package/.cursor/skills/api-development/SKILL.md +315 -0
- package/.cursor/skills/architecture-design/SKILL.md +152 -0
- package/.cursor/skills/auto-test/SKILL.md +453 -0
- package/.cursor/skills/auto-test/references/api-conventions.md +260 -0
- package/.cursor/skills/backend-annotations/SKILL.md +248 -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 +171 -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 +216 -0
- package/.cursor/skills/bug-detective/SKILL.md +295 -0
- package/.cursor/skills/bug-detective/references/error-patterns.md +242 -0
- package/.cursor/skills/code-patterns/SKILL.md +163 -0
- package/.cursor/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.cursor/skills/collaborating-with-codex/SKILL.md +180 -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 +328 -0
- package/.cursor/skills/data-permission/SKILL.md +221 -0
- package/.cursor/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.cursor/skills/database-ops/SKILL.md +210 -0
- package/.cursor/skills/error-handler/SKILL.md +310 -0
- package/.cursor/skills/file-oss-management/SKILL.md +260 -0
- package/.cursor/skills/file-oss-management/references/entities.md +105 -0
- package/.cursor/skills/file-oss-management/references/service-impl.md +104 -0
- package/.cursor/skills/fix-bug/SKILL.md +269 -0
- package/.cursor/skills/git-workflow/SKILL.md +179 -0
- package/.cursor/skills/jenkins-deploy/SKILL.md +134 -0
- package/.cursor/skills/json-serialization/SKILL.md +341 -0
- package/.cursor/skills/lanhu-design/SKILL.md +99 -0
- package/.cursor/skills/leniu-api-development/SKILL.md +319 -0
- package/.cursor/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.cursor/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.cursor/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.cursor/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.cursor/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.cursor/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.cursor/skills/leniu-crud-development/SKILL.md +404 -0
- package/.cursor/skills/leniu-crud-development/references/templates.md +597 -0
- package/.cursor/skills/leniu-customization-location/SKILL.md +410 -0
- package/.cursor/skills/leniu-data-permission/SKILL.md +341 -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 +237 -0
- package/.cursor/skills/leniu-java-entity/references/templates.md +237 -0
- package/.cursor/skills/leniu-java-logging/SKILL.md +229 -0
- package/.cursor/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.cursor/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.cursor/skills/leniu-java-mq/SKILL.md +338 -0
- package/.cursor/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.cursor/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.cursor/skills/leniu-java-task/SKILL.md +367 -0
- package/.cursor/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.cursor/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.cursor/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.cursor/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.cursor/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.cursor/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.cursor/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.cursor/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.cursor/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.cursor/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.cursor/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.cursor/skills/leniu-report-scenario/references/export.md +553 -0
- package/.cursor/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.cursor/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.cursor/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.cursor/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.cursor/skills/leniu-security-guard/SKILL.md +306 -0
- package/.cursor/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.cursor/skills/loki-log-query/SKILL.md +430 -0
- package/.cursor/skills/loki-log-query/environments.json +45 -0
- package/.cursor/skills/mysql-debug/SKILL.md +406 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +165 -0
- package/.cursor/skills/openspec-archive-change/SKILL.md +122 -0
- package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.cursor/skills/openspec-continue-change/SKILL.md +126 -0
- package/.cursor/skills/openspec-explore/SKILL.md +299 -0
- package/.cursor/skills/openspec-ff-change/SKILL.md +109 -0
- package/.cursor/skills/openspec-new-change/SKILL.md +82 -0
- package/.cursor/skills/openspec-onboard/SKILL.md +414 -0
- package/.cursor/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.cursor/skills/openspec-verify-change/SKILL.md +176 -0
- package/.cursor/skills/performance-doctor/SKILL.md +297 -0
- package/.cursor/skills/project-navigator/SKILL.md +211 -0
- package/.cursor/skills/redis-cache/SKILL.md +282 -0
- package/.cursor/skills/redis-cache/references/listeners.md +23 -0
- package/.cursor/skills/scheduled-jobs/SKILL.md +277 -0
- package/.cursor/skills/security-guard/SKILL.md +245 -0
- package/.cursor/skills/security-guard/references/encrypt-config.md +103 -0
- package/.cursor/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.cursor/skills/skill-creator/LICENSE.txt +202 -0
- package/.cursor/skills/skill-creator/SKILL.md +479 -0
- package/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
- package/.cursor/skills/skill-creator/agents/comparator.md +202 -0
- package/.cursor/skills/skill-creator/agents/grader.md +223 -0
- package/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
- package/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.cursor/skills/skill-creator/references/schemas.md +430 -0
- package/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
- package/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.cursor/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.cursor/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.cursor/skills/skill-creator/scripts/utils.py +47 -0
- package/.cursor/skills/sms-mail/SKILL.md +346 -0
- package/.cursor/skills/sms-mail/references/mail-config.md +88 -0
- package/.cursor/skills/sms-mail/references/sms-config.md +74 -0
- package/.cursor/skills/social-login/SKILL.md +328 -0
- package/.cursor/skills/social-login/references/provider-configs.md +118 -0
- package/.cursor/skills/store-pc/SKILL.md +366 -0
- package/.cursor/skills/sync-back-merge/SKILL.md +66 -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 +272 -0
- package/.cursor/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.cursor/skills/test-development/SKILL.md +301 -0
- package/.cursor/skills/test-development/references/parameterized-examples.md +119 -0
- package/.cursor/skills/ui-pc/SKILL.md +438 -0
- package/.cursor/skills/utils-toolkit/SKILL.md +354 -0
- package/.cursor/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.cursor/skills/websocket-sse/SKILL.md +350 -0
- package/.cursor/skills/workflow-engine/SKILL.md +249 -0
- package/.cursor/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.cursor/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/templates/env-config.md +27 -0
- package/AGENTS.md +275 -0
- package/CLAUDE.md +285 -0
- package/README.md +104 -0
- package/bin/index.js +3069 -0
- package/init.sh +178 -0
- package/package.json +40 -0
- package/scripts/build-skills.js +180 -0
- package/src/platform-map.json +100 -0
- package/src/skills/add-skill/SKILL.md +488 -0
- package/src/skills/add-todo/SKILL.md +269 -0
- package/src/skills/analyze-requirements/SKILL.md +112 -0
- package/src/skills/api-development/SKILL.md +315 -0
- package/src/skills/architecture-design/SKILL.md +152 -0
- package/src/skills/backend-annotations/SKILL.md +248 -0
- package/src/skills/banana-image/CHANGELOG.md +37 -0
- package/src/skills/banana-image/README.md +146 -0
- package/src/skills/banana-image/SKILL.md +171 -0
- package/src/skills/banana-image/assets/logo.png +0 -0
- package/src/skills/banana-image/references/advanced-usage.md +189 -0
- package/src/skills/banana-image/scripts/apply_template.py +125 -0
- package/src/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/src/skills/banana-image/scripts/batch_prep.py +82 -0
- package/src/skills/banana-image/scripts/package-lock.json +1437 -0
- package/src/skills/banana-image/scripts/package.json +18 -0
- package/src/skills/banana-image/scripts/requirements.txt +10 -0
- package/src/skills/banana-image/templates/poster.json +22 -0
- package/src/skills/banana-image/templates/product.json +17 -0
- package/src/skills/banana-image/templates/social.json +22 -0
- package/src/skills/banana-image/templates/thumbnail.json +17 -0
- package/src/skills/brainstorm/SKILL.md +216 -0
- package/src/skills/bug-detective/SKILL.md +295 -0
- package/src/skills/bug-detective/references/error-patterns.md +242 -0
- package/src/skills/check/SKILL.md +367 -0
- package/src/skills/code-patterns/SKILL.md +163 -0
- package/src/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/src/skills/codex-code-review/SKILL.md +327 -0
- package/src/skills/collaborating-with-codex/SKILL.md +180 -0
- package/src/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/src/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/src/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/src/skills/crud/SKILL.md +265 -0
- package/src/skills/crud-development/SKILL.md +328 -0
- package/src/skills/data-permission/SKILL.md +221 -0
- package/src/skills/data-permission/references/custom-data-scope.md +90 -0
- package/src/skills/database-ops/SKILL.md +210 -0
- package/src/skills/dev/SKILL.md +187 -0
- package/src/skills/error-handler/SKILL.md +310 -0
- package/src/skills/file-oss-management/SKILL.md +260 -0
- package/src/skills/file-oss-management/references/entities.md +105 -0
- package/src/skills/file-oss-management/references/service-impl.md +104 -0
- package/src/skills/fix-bug/SKILL.md +269 -0
- package/src/skills/git-workflow/SKILL.md +179 -0
- package/src/skills/init-docs/SKILL.md +194 -0
- package/src/skills/json-serialization/SKILL.md +341 -0
- package/src/skills/leniu-api-development/SKILL.md +319 -0
- package/src/skills/leniu-api-development/references/real-examples.md +273 -0
- package/src/skills/leniu-architecture-design/SKILL.md +383 -0
- package/src/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/src/skills/leniu-brainstorm/SKILL.md +242 -0
- package/src/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/src/skills/leniu-code-patterns/SKILL.md +411 -0
- package/src/skills/leniu-crud-development/SKILL.md +404 -0
- package/src/skills/leniu-crud-development/references/templates.md +597 -0
- package/src/skills/leniu-customization-location/SKILL.md +410 -0
- package/src/skills/leniu-data-permission/SKILL.md +341 -0
- package/src/skills/leniu-database-ops/SKILL.md +426 -0
- package/src/skills/leniu-error-handler/SKILL.md +462 -0
- package/src/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/src/skills/leniu-java-code-style/SKILL.md +510 -0
- package/src/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/src/skills/leniu-java-entity/SKILL.md +237 -0
- package/src/skills/leniu-java-entity/references/templates.md +237 -0
- package/src/skills/leniu-java-export/SKILL.md +570 -0
- package/src/skills/leniu-java-logging/SKILL.md +229 -0
- package/src/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/src/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/src/skills/leniu-java-mq/SKILL.md +338 -0
- package/src/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/src/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/src/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/src/skills/leniu-java-task/SKILL.md +367 -0
- package/src/skills/leniu-java-total-line/SKILL.md +196 -0
- package/src/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/src/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/src/skills/leniu-mealtime/SKILL.md +215 -0
- package/src/skills/leniu-redis-cache/SKILL.md +331 -0
- package/src/skills/leniu-report-customization/SKILL.md +415 -0
- package/src/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/src/skills/leniu-report-standard-customization/SKILL.md +391 -0
- package/src/skills/leniu-report-standard-customization/references/analysis-module.md +64 -0
- package/src/skills/leniu-report-standard-customization/references/table-fields.md +113 -0
- package/src/skills/leniu-security-guard/SKILL.md +306 -0
- package/src/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/src/skills/loki-log-query/SKILL.md +400 -0
- package/src/skills/loki-log-query/environments.json +45 -0
- package/src/skills/mysql-debug/SKILL.md +400 -0
- package/src/skills/next/SKILL.md +137 -0
- package/src/skills/openspec-apply-change/SKILL.md +165 -0
- package/src/skills/openspec-archive-change/SKILL.md +122 -0
- package/src/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/src/skills/openspec-continue-change/SKILL.md +126 -0
- package/src/skills/openspec-explore/SKILL.md +299 -0
- package/src/skills/openspec-ff-change/SKILL.md +109 -0
- package/src/skills/openspec-new-change/SKILL.md +82 -0
- package/src/skills/openspec-onboard/SKILL.md +414 -0
- package/src/skills/openspec-sync-specs/SKILL.md +146 -0
- package/src/skills/openspec-verify-change/SKILL.md +176 -0
- package/src/skills/performance-doctor/SKILL.md +297 -0
- package/src/skills/progress/SKILL.md +193 -0
- package/src/skills/project-navigator/SKILL.md +211 -0
- package/src/skills/redis-cache/SKILL.md +282 -0
- package/src/skills/redis-cache/references/listeners.md +23 -0
- package/src/skills/scheduled-jobs/SKILL.md +277 -0
- package/src/skills/security-guard/SKILL.md +245 -0
- package/src/skills/security-guard/references/encrypt-config.md +103 -0
- package/src/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/src/skills/skill-creator/LICENSE.txt +202 -0
- package/src/skills/skill-creator/SKILL.md +479 -0
- package/src/skills/skill-creator/agents/analyzer.md +274 -0
- package/src/skills/skill-creator/agents/comparator.md +202 -0
- package/src/skills/skill-creator/agents/grader.md +223 -0
- package/src/skills/skill-creator/assets/eval_review.html +146 -0
- package/src/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/src/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/src/skills/skill-creator/references/schemas.md +430 -0
- package/src/skills/skill-creator/scripts/__init__.py +0 -0
- package/src/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/src/skills/skill-creator/scripts/generate_report.py +326 -0
- package/src/skills/skill-creator/scripts/improve_description.py +248 -0
- package/src/skills/skill-creator/scripts/package_skill.py +136 -0
- package/src/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/src/skills/skill-creator/scripts/run_eval.py +310 -0
- package/src/skills/skill-creator/scripts/run_loop.py +332 -0
- package/src/skills/skill-creator/scripts/utils.py +47 -0
- package/src/skills/sms-mail/SKILL.md +346 -0
- package/src/skills/sms-mail/references/mail-config.md +88 -0
- package/src/skills/sms-mail/references/sms-config.md +74 -0
- package/src/skills/social-login/SKILL.md +328 -0
- package/src/skills/social-login/references/provider-configs.md +118 -0
- package/src/skills/start/SKILL.md +154 -0
- package/src/skills/store-pc/SKILL.md +366 -0
- package/src/skills/sync/SKILL.md +149 -0
- package/src/skills/sync-back-merge/SKILL.md +66 -0
- package/src/skills/task-tracker/SKILL.md +307 -0
- package/src/skills/tech-decision/SKILL.md +393 -0
- package/src/skills/tenant-management/SKILL.md +272 -0
- package/src/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/src/skills/test-development/SKILL.md +301 -0
- package/src/skills/test-development/references/parameterized-examples.md +119 -0
- package/src/skills/ui-pc/SKILL.md +438 -0
- package/src/skills/update-status/SKILL.md +159 -0
- package/src/skills/utils-toolkit/SKILL.md +354 -0
- package/src/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/src/skills/websocket-sse/SKILL.md +350 -0
- package/src/skills/workflow-engine/SKILL.md +249 -0
- package/src/skills/yunxiao-task-management/SKILL.md +401 -0
- package/src/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: leniu-java-code-style
|
|
3
|
+
description: |
|
|
4
|
+
leniu-tengyun-core 项目代码风格和命名规范。当编写或生成 Java 代码时使用此 skill,适用于所有 Java 类的命名和风格规范。
|
|
5
|
+
|
|
6
|
+
触发场景:
|
|
7
|
+
- 编写 Java 类时的命名规范(类名、方法名、变量名)
|
|
8
|
+
- 代码风格检查(注解使用、依赖注入方式)
|
|
9
|
+
- 包结构规范设计
|
|
10
|
+
- Controller/Service/Entity/VO/DTO 等各类型 Java 类规范
|
|
11
|
+
|
|
12
|
+
触发词:代码风格、命名规范、类命名、方法命名、包结构、注解使用、依赖注入、驼峰命名、代码规范
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# leniu-tengyun-core 代码风格规范
|
|
16
|
+
|
|
17
|
+
## 项目特征
|
|
18
|
+
|
|
19
|
+
| 特征 | 说明 |
|
|
20
|
+
|------|------|
|
|
21
|
+
| **包名前缀** | `net.xnzn.core.*` |
|
|
22
|
+
| **JDK 版本** | 21 |
|
|
23
|
+
| **Validation** | `jakarta.validation.*` |
|
|
24
|
+
| **工具库** | Hutool (CollUtil, ObjectUtil, BeanUtil) |
|
|
25
|
+
| **异常类** | `LeException` |
|
|
26
|
+
| **国际化** | `I18n` |
|
|
27
|
+
| **租户上下文** | `TenantContextHolder` |
|
|
28
|
+
| **分页组件** | PageHelper (PageMethod) |
|
|
29
|
+
|
|
30
|
+
## 包结构规范
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
net.xnzn.core
|
|
34
|
+
├── [module]/
|
|
35
|
+
│ ├── controller/ # 控制器层
|
|
36
|
+
│ ├── service/ # 服务层
|
|
37
|
+
│ │ └── impl/ # 服务实现
|
|
38
|
+
│ ├── mapper/ # 数据访问层(含 XML)
|
|
39
|
+
│ ├── model/ # 数据模型
|
|
40
|
+
│ │ ├── entity/ # 实体类
|
|
41
|
+
│ │ └── po/ # 持久化对象
|
|
42
|
+
│ ├── vo/ # 视图对象(返回前端)
|
|
43
|
+
│ ├── dto/ # 数据传输对象(服务间/MQ)
|
|
44
|
+
│ ├── param/ # 请求参数对象
|
|
45
|
+
│ ├── constants/ # 常量
|
|
46
|
+
│ ├── enums/ # 枚举
|
|
47
|
+
│ ├── api/ # 对外 API 接口
|
|
48
|
+
│ ├── config/ # 配置类
|
|
49
|
+
│ ├── mq/ # 消息队列监听器
|
|
50
|
+
│ ├── task/ # 定时任务
|
|
51
|
+
│ ├── handle/ # 业务处理器(策略模式)
|
|
52
|
+
│ └── util/ # 工具类
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 类命名规范
|
|
56
|
+
|
|
57
|
+
| 类型 | 命名格式 | 示例 |
|
|
58
|
+
|------|----------|------|
|
|
59
|
+
| Controller | `XxxController` | `OrderController` |
|
|
60
|
+
| Service 接口 | `XxxService` | `OrderService` |
|
|
61
|
+
| Service 实现 | `XxxServiceImpl` | `OrderServiceImpl` |
|
|
62
|
+
| Mapper | `XxxMapper` | `OrderMapper` |
|
|
63
|
+
| Entity | `Xxx` 或 `XxxEntity` | `Order` |
|
|
64
|
+
| PO | `XxxPO` | `OrderPO` |
|
|
65
|
+
| VO | `XxxVO` | `OrderVO` |
|
|
66
|
+
| DTO | `XxxDTO` | `OrderDTO` |
|
|
67
|
+
| Param | `XxxParam` / `XxxQueryParam` | `OrderQueryParam` |
|
|
68
|
+
| Enum | `XxxEnum` | `OrderStatusEnum` |
|
|
69
|
+
| Converter | `XxxConverter` | `OrderConverter` |
|
|
70
|
+
| Handler | `XxxHandler` | `OrderHandler` |
|
|
71
|
+
| Api | `XxxApi` | `OrderApi` |
|
|
72
|
+
|
|
73
|
+
## 方法命名规范
|
|
74
|
+
|
|
75
|
+
| 操作 | Service 方法 | Mapper 方法 | Controller URL |
|
|
76
|
+
|------|-------------|-------------|---------------|
|
|
77
|
+
| 分页查询 | `pageXxx` | `pageXxx` | `GET /list` |
|
|
78
|
+
| 查询列表 | `listXxx` | `listXxx` | - |
|
|
79
|
+
| 查询单个 | `getXxx` | `selectById` | `GET /{id}` |
|
|
80
|
+
| 新增 | `save` / `add` / `create` | `insert` | `POST /` |
|
|
81
|
+
| 更新 | `update` / `modify` | `updateById` | `PUT /` |
|
|
82
|
+
| 删除 | `delete` / `remove` | `deleteById` | `DELETE /{ids}` |
|
|
83
|
+
| 统计 | `count` / `summary` | `selectCount` | - |
|
|
84
|
+
| 导出 | `export` | - | `POST /export` |
|
|
85
|
+
| 同步 | `sync` | - | - |
|
|
86
|
+
|
|
87
|
+
## Controller 层模板
|
|
88
|
+
|
|
89
|
+
```java
|
|
90
|
+
import io.swagger.annotations.Api;
|
|
91
|
+
import io.swagger.annotations.ApiOperation;
|
|
92
|
+
import lombok.extern.slf4j.Slf4j;
|
|
93
|
+
import net.xnzn.core.common.exception.LeException;
|
|
94
|
+
import net.xnzn.core.common.response.LeResponse;
|
|
95
|
+
import net.xnzn.core.order.param.OrderQueryParam;
|
|
96
|
+
import net.xnzn.core.order.service.OrderService;
|
|
97
|
+
import net.xnzn.core.order.vo.OrderVO;
|
|
98
|
+
import org.springframework.beans.factory.annotation.Autowired;
|
|
99
|
+
import org.springframework.web.bind.annotation.*;
|
|
100
|
+
|
|
101
|
+
import jakarta.validation.Valid;
|
|
102
|
+
|
|
103
|
+
@Slf4j
|
|
104
|
+
@RequiresAuthentication
|
|
105
|
+
@RestController
|
|
106
|
+
@RequestMapping("/api/order")
|
|
107
|
+
@Api(value = "订单管理", tags = "订单管理")
|
|
108
|
+
public class OrderController {
|
|
109
|
+
|
|
110
|
+
@Autowired
|
|
111
|
+
private OrderService orderService;
|
|
112
|
+
|
|
113
|
+
@ApiOperation(value = "分页查询订单")
|
|
114
|
+
@PostMapping("/list")
|
|
115
|
+
public LeResponse<Page<OrderVO>> list(@Valid @RequestBody OrderQueryParam param) {
|
|
116
|
+
return LeResponse.success(orderService.pageList(param));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@ApiOperation(value = "获取订单详情")
|
|
120
|
+
@GetMapping("/{id}")
|
|
121
|
+
public LeResponse<OrderVO> getById(@PathVariable Long id) {
|
|
122
|
+
return LeResponse.success(orderService.getById(id));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@ApiOperation(value = "创建订单")
|
|
126
|
+
@PostMapping("/")
|
|
127
|
+
public LeResponse<Long> create(@Valid @RequestBody OrderParam param) {
|
|
128
|
+
return LeResponse.success(orderService.create(param));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@ApiOperation(value = "更新订单")
|
|
132
|
+
@PutMapping("/")
|
|
133
|
+
public LeResponse<Boolean> update(@Valid @RequestBody OrderParam param) {
|
|
134
|
+
return LeResponse.success(orderService.update(param));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@ApiOperation(value = "删除订单")
|
|
138
|
+
@DeleteMapping("/{ids}")
|
|
139
|
+
public LeResponse<Boolean> delete(@PathVariable String ids) {
|
|
140
|
+
return LeResponse.success(orderService.delete(ids));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**要点**:
|
|
146
|
+
- 统一使用 `@PostMapping`(部分查询也可以用 `@GetMapping`)
|
|
147
|
+
- 需要 `@RequiresAuthentication` 认证注解
|
|
148
|
+
- 使用 `LeResponse<T>` 封装返回结果
|
|
149
|
+
- 参数校验使用 `@Valid` 触发
|
|
150
|
+
|
|
151
|
+
## Service 层模板
|
|
152
|
+
|
|
153
|
+
```java
|
|
154
|
+
import cn.hutool.core.util.ObjectUtil;
|
|
155
|
+
import cn.hutool.core.bean.BeanUtil;
|
|
156
|
+
import lombok.extern.slf4j.Slf4j;
|
|
157
|
+
import net.xnzn.core.common.exception.LeException;
|
|
158
|
+
import net.xnzn.core.order.mapper.OrderMapper;
|
|
159
|
+
import net.xnzn.core.order.model.Order;
|
|
160
|
+
import net.xnzn.core.order.param.OrderParam;
|
|
161
|
+
import net.xnzn.core.order.vo.OrderVO;
|
|
162
|
+
import org.springframework.beans.factory.annotation.Autowired;
|
|
163
|
+
import org.springframework.stereotype.Service;
|
|
164
|
+
import org.springframework.transaction.annotation.Transactional;
|
|
165
|
+
|
|
166
|
+
import java.util.List;
|
|
167
|
+
|
|
168
|
+
@Slf4j
|
|
169
|
+
@Service
|
|
170
|
+
public class OrderServiceImpl implements OrderService {
|
|
171
|
+
|
|
172
|
+
@Autowired
|
|
173
|
+
private OrderMapper orderMapper;
|
|
174
|
+
|
|
175
|
+
@Autowired
|
|
176
|
+
@Lazy
|
|
177
|
+
private ProductService productService;
|
|
178
|
+
|
|
179
|
+
@Transactional(rollbackFor = Exception.class)
|
|
180
|
+
public Long create(OrderParam param) {
|
|
181
|
+
// 业务逻辑
|
|
182
|
+
Order order = BeanUtil.copyProperties(param, Order.class);
|
|
183
|
+
orderMapper.insert(order);
|
|
184
|
+
return order.getId();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
public OrderVO getById(Long id) {
|
|
188
|
+
Order order = orderMapper.selectById(id);
|
|
189
|
+
if (ObjectUtil.isNull(order)) {
|
|
190
|
+
throw new LeException("订单不存在");
|
|
191
|
+
}
|
|
192
|
+
return BeanUtil.copyProperties(order, OrderVO.class);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
public List<OrderVO> list(OrderQueryParam param) {
|
|
196
|
+
List<Order> orders = orderMapper.selectList(buildWrapper(param));
|
|
197
|
+
return BeanUtil.copyToList(orders, OrderVO.class);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**要点**:
|
|
203
|
+
- 使用 `@Slf4j` 日志注解
|
|
204
|
+
- 循环依赖使用 `@Lazy`
|
|
205
|
+
- 事务使用 `@Transactional(rollbackFor = Exception.class)`
|
|
206
|
+
- 使用 Hutool 工具类:`BeanUtil`、`ObjectUtil`
|
|
207
|
+
|
|
208
|
+
## Entity 实体类模板
|
|
209
|
+
|
|
210
|
+
```java
|
|
211
|
+
import com.baomidou.mybatisplus.annotation.*;
|
|
212
|
+
import io.swagger.annotations.ApiModel;
|
|
213
|
+
import io.swagger.annotations.ApiModelProperty;
|
|
214
|
+
import lombok.Data;
|
|
215
|
+
|
|
216
|
+
import java.time.LocalDateTime;
|
|
217
|
+
|
|
218
|
+
@Data
|
|
219
|
+
@TableName(value = "order_table", autoResultMap = true)
|
|
220
|
+
public class Order {
|
|
221
|
+
|
|
222
|
+
@TableId
|
|
223
|
+
@ApiModelProperty(value = "订单ID")
|
|
224
|
+
private Long id;
|
|
225
|
+
|
|
226
|
+
@ApiModelProperty(value = "用户ID")
|
|
227
|
+
private Long userId;
|
|
228
|
+
|
|
229
|
+
@ApiModelProperty(value = "订单金额(分)")
|
|
230
|
+
private Long amount;
|
|
231
|
+
|
|
232
|
+
@ApiModelProperty(value = "删除标识(1-删除,2-正常)")
|
|
233
|
+
private Integer delFlag;
|
|
234
|
+
|
|
235
|
+
@TableField(fill = FieldFill.INSERT)
|
|
236
|
+
@ApiModelProperty(value = "创建人")
|
|
237
|
+
private String crby;
|
|
238
|
+
|
|
239
|
+
@TableField(fill = FieldFill.INSERT)
|
|
240
|
+
@ApiModelProperty(value = "创建时间")
|
|
241
|
+
private LocalDateTime crtime;
|
|
242
|
+
|
|
243
|
+
@TableField(fill = FieldFill.INSERT_UPDATE)
|
|
244
|
+
@ApiModelProperty(value = "更新人")
|
|
245
|
+
private String upby;
|
|
246
|
+
|
|
247
|
+
@TableField(fill = FieldFill.INSERT_UPDATE)
|
|
248
|
+
@ApiModelProperty(value = "更新时间")
|
|
249
|
+
private LocalDateTime uptime;
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**要点**:
|
|
254
|
+
- 使用 `@TableName` 指定表名
|
|
255
|
+
- 主键使用 `@TableId`
|
|
256
|
+
- 字段使用 `@TableField` 映射
|
|
257
|
+
- 审计字段:`delFlag`(1=删除,2=正常)、`crby`、`crtime`、`upby`、`uptime`
|
|
258
|
+
|
|
259
|
+
## VO/DTO 类模板
|
|
260
|
+
|
|
261
|
+
```java
|
|
262
|
+
import io.swagger.annotations.ApiModel;
|
|
263
|
+
import io.swagger.annotations.ApiModelProperty;
|
|
264
|
+
import jakarta.validation.constraints.*;
|
|
265
|
+
import lombok.Data;
|
|
266
|
+
import lombok.experimental.Accessors;
|
|
267
|
+
|
|
268
|
+
@Data
|
|
269
|
+
@ApiModel("订单信息")
|
|
270
|
+
@Accessors(chain = true)
|
|
271
|
+
public class OrderVO {
|
|
272
|
+
|
|
273
|
+
@ApiModelProperty("订单ID")
|
|
274
|
+
private Long id;
|
|
275
|
+
|
|
276
|
+
@ApiModelProperty("用户ID")
|
|
277
|
+
@NotNull(message = "用户ID不能为空")
|
|
278
|
+
private Long userId;
|
|
279
|
+
|
|
280
|
+
@ApiModelProperty("订单金额(元)")
|
|
281
|
+
@NotNull(message = "订单金额不能为空")
|
|
282
|
+
@DecimalMin(value = "0.01", message = "金额必须大于0.01")
|
|
283
|
+
private BigDecimal amount;
|
|
284
|
+
|
|
285
|
+
@ApiModelProperty("订单状态")
|
|
286
|
+
private Integer status;
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**要点**:
|
|
291
|
+
- 使用 `@ApiModel` 类注解
|
|
292
|
+
- 使用 `@ApiModelProperty` 字段注解
|
|
293
|
+
- 参数校验使用 `jakarta.validation.constraints.*` 注解
|
|
294
|
+
- 使用 `@Accessors(chain = true)` 支持链式调用
|
|
295
|
+
|
|
296
|
+
## 枚举类模板
|
|
297
|
+
|
|
298
|
+
```java
|
|
299
|
+
import lombok.AllArgsConstructor;
|
|
300
|
+
import lombok.Getter;
|
|
301
|
+
|
|
302
|
+
@Getter
|
|
303
|
+
@AllArgsConstructor
|
|
304
|
+
public enum OrderStatusEnum {
|
|
305
|
+
|
|
306
|
+
CREATED(1, "已创建"),
|
|
307
|
+
PAID(2, "已支付"),
|
|
308
|
+
COMPLETED(3, "已完成"),
|
|
309
|
+
CANCELLED(4, "已取消");
|
|
310
|
+
|
|
311
|
+
private final Integer key;
|
|
312
|
+
private final String desc;
|
|
313
|
+
|
|
314
|
+
public static OrderStatusEnum getByKey(Integer key) {
|
|
315
|
+
if (key == null) {
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
for (OrderStatusEnum status : values()) {
|
|
319
|
+
if (status.getKey().equals(key)) {
|
|
320
|
+
return status;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
public static boolean isExistKey(Integer key) {
|
|
327
|
+
return getByKey(key) != null;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**要点**:
|
|
333
|
+
- 使用 `@Getter` 和 `@AllArgsConstructor`
|
|
334
|
+
- 提供 `getByKey` 静态方法
|
|
335
|
+
- 提供 `isExistKey` 校验方法
|
|
336
|
+
|
|
337
|
+
## 依赖注入规范
|
|
338
|
+
|
|
339
|
+
```java
|
|
340
|
+
// 推荐:字段注入
|
|
341
|
+
@Autowired
|
|
342
|
+
private OrderService orderService;
|
|
343
|
+
|
|
344
|
+
// 解决循环依赖
|
|
345
|
+
@Resource
|
|
346
|
+
@Lazy
|
|
347
|
+
private ProductService productService;
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## 异常处理
|
|
351
|
+
|
|
352
|
+
```java
|
|
353
|
+
import net.xnzn.core.common.exception.LeException;
|
|
354
|
+
import net.xnzn.core.common.i18n.I18n;
|
|
355
|
+
|
|
356
|
+
// 简单异常
|
|
357
|
+
throw new LeException("订单不存在");
|
|
358
|
+
|
|
359
|
+
// 国际化异常
|
|
360
|
+
throw new LeException(I18n.getMessage("order.not.exists"));
|
|
361
|
+
|
|
362
|
+
// 带参数的国际化
|
|
363
|
+
throw new LeException(I18n.getMessage("order.status.invalid", status));
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## Hutool 工具类速查
|
|
367
|
+
|
|
368
|
+
```java
|
|
369
|
+
import cn.hutool.core.collection.CollUtil;
|
|
370
|
+
import cn.hutool.core.util.ObjectUtil;
|
|
371
|
+
import cn.hutool.core.util.StrUtil;
|
|
372
|
+
import cn.hutool.core.bean.BeanUtil;
|
|
373
|
+
|
|
374
|
+
// 集合操作
|
|
375
|
+
if (CollUtil.isEmpty(list)) {
|
|
376
|
+
throw new LeException("列表不能为空");
|
|
377
|
+
}
|
|
378
|
+
if (CollUtil.isNotEmpty(list)) {
|
|
379
|
+
// 处理列表
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// 对象判空
|
|
383
|
+
if (ObjectUtil.isNull(user)) {
|
|
384
|
+
throw new LeException("用户不存在");
|
|
385
|
+
}
|
|
386
|
+
if (ObjectUtil.isNotNull(user)) {
|
|
387
|
+
// 处理用户
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// 字符串操作
|
|
391
|
+
if (StrUtil.isBlank(name)) {
|
|
392
|
+
throw new LeException("名称不能为空");
|
|
393
|
+
}
|
|
394
|
+
String trimmed = StrUtil.trim(name);
|
|
395
|
+
String joined = StrUtil.join(",", list);
|
|
396
|
+
|
|
397
|
+
// 对象拷贝
|
|
398
|
+
TargetDTO target = BeanUtil.copyProperties(source, TargetDTO.class);
|
|
399
|
+
List<TargetDTO> targets = BeanUtil.copyToList(sources, TargetDTO.class);
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
## 常用注解
|
|
403
|
+
|
|
404
|
+
### Jakarta Validation
|
|
405
|
+
|
|
406
|
+
**重要**:项目使用 JDK 21,必须使用 `jakarta.validation.constraints.*` 包
|
|
407
|
+
|
|
408
|
+
```java
|
|
409
|
+
import jakarta.validation.Valid;
|
|
410
|
+
import jakarta.validation.constraints.*;
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
- `@NotNull` - 不能为 null
|
|
414
|
+
- `@NotBlank` - 字符串不能为空
|
|
415
|
+
- `@NotEmpty` - 集合不能为空
|
|
416
|
+
- `@Valid` - 触发参数校验
|
|
417
|
+
|
|
418
|
+
### Lombok
|
|
419
|
+
|
|
420
|
+
- `@Data` - 生成 getter/setter
|
|
421
|
+
- `@Slf4j` - 日志
|
|
422
|
+
- `@Builder` - 建造者模式
|
|
423
|
+
- `@AllArgsConstructor` - 全参构造
|
|
424
|
+
- `@Accessors(chain = true)` - 链式调用
|
|
425
|
+
|
|
426
|
+
### MyBatis-Plus
|
|
427
|
+
|
|
428
|
+
- `@TableName` - 表名映射
|
|
429
|
+
- `@TableId` - 主键
|
|
430
|
+
- `@TableField` - 字段映射
|
|
431
|
+
- `@TableField(fill = FieldFill.INSERT)` - 插入时自动填充
|
|
432
|
+
- `@TableField(fill = FieldFill.INSERT_UPDATE)` - 更新时自动填充
|
|
433
|
+
|
|
434
|
+
## 类注释规范
|
|
435
|
+
|
|
436
|
+
推荐使用 JavaDoc 标准格式:
|
|
437
|
+
|
|
438
|
+
```java
|
|
439
|
+
/**
|
|
440
|
+
* 类功能描述
|
|
441
|
+
*
|
|
442
|
+
* @author xujiajun
|
|
443
|
+
* @date 2026-02-20
|
|
444
|
+
*/
|
|
445
|
+
public class OrderService {
|
|
446
|
+
// ...
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**说明**:
|
|
451
|
+
- `@author` 使用实际作者名称
|
|
452
|
+
- `@date` 使用代码创建日期(格式:`YYYY-MM-DD`)
|
|
453
|
+
|
|
454
|
+
## 常见错误
|
|
455
|
+
|
|
456
|
+
### 错误1:使用 RuoYi 的包名
|
|
457
|
+
|
|
458
|
+
```java
|
|
459
|
+
// ❌ 错误:使用 RuoYi 的包名
|
|
460
|
+
package org.dromara.system.service;
|
|
461
|
+
|
|
462
|
+
// ✅ 正确:使用 leniu 的包名
|
|
463
|
+
package net.xnzn.core.order.service;
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### 错误2:使用 javax.validation
|
|
467
|
+
|
|
468
|
+
```java
|
|
469
|
+
// ❌ 错误:使用 javax.validation(JDK 21 应该用 jakarta)
|
|
470
|
+
import javax.validation.constraints.NotNull;
|
|
471
|
+
|
|
472
|
+
// ✅ 正确:使用 jakarta.validation
|
|
473
|
+
import jakarta.validation.constraints.NotNull;
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### 错误3:使用 MapstructUtils
|
|
477
|
+
|
|
478
|
+
```java
|
|
479
|
+
// ❌ 错误:使用 RuoYi 的工具类
|
|
480
|
+
import org.dromara.common.core.utils.MapstructUtils;
|
|
481
|
+
Target target = MapstructUtils.convert(source, Target.class);
|
|
482
|
+
|
|
483
|
+
// ✅ 正确:leniu 使用 Hutool
|
|
484
|
+
import cn.hutool.core.bean.BeanUtil;
|
|
485
|
+
Target target = BeanUtil.copyProperties(source, Target.class);
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### 错误4:使用 LeException 不使用 I18n
|
|
489
|
+
|
|
490
|
+
```java
|
|
491
|
+
// ❌ 不推荐:直接硬编码中文
|
|
492
|
+
throw new LeException("订单不存在");
|
|
493
|
+
|
|
494
|
+
// ✅ 推荐:使用国际化
|
|
495
|
+
throw new LeException(I18n.getMessage("order.not.exists"));
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
### 错误5:使用 RuoYi 的 ServiceException
|
|
499
|
+
|
|
500
|
+
```java
|
|
501
|
+
// ❌ 错误:使用 RuoYi 的异常
|
|
502
|
+
import org.dromara.common.core.exception.ServiceException;
|
|
503
|
+
|
|
504
|
+
// ✅ 正确:使用 leniu 的异常
|
|
505
|
+
import net.xnzn.core.common.exception.LeException;
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
## 参考文档
|
|
509
|
+
|
|
510
|
+
详见:[leniu-tengyun-core 源码](/Users/xujiajun/Developer/gongsi_proj/core/leniu-tengyun-core)
|