create-yss-spec 3.4.9 → 3.5.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/README.md +2 -2
- package/package.json +1 -1
- package/src/api/_sync-service.js +111 -18
- package/src/cli/args.js +1 -0
- package/src/cli/help.js +10 -1
- package/src/cli/index.js +3 -0
- package/src/cli/prompts.js +5 -1
- package/src/cli/router.js +2 -0
- package/src/commands/attach.js +12 -2
- package/src/commands/init.js +2 -0
- package/src/commands/skills.js +253 -0
- package/src/commands/sync.js +3 -0
- package/src/family-identity.js +1 -1
- package/src/template/asset-runtime.js +220 -0
- package/src/template/attach-planner.js +5 -0
- package/src/template/distribution-runtime.js +165 -0
- package/src/template/instance-runtime.js +76 -29
- package/src/template/ownership-policy.js +17 -1
- package/src/template/prune-planner.js +6 -1
- package/src/template/sync-planner.js +8 -0
- package/src/template/verification-runtime.js +56 -1
- package/src/validation/metadata.js +24 -1
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/yss-cache/SKILL.md +6 -5
- package/template/.agents/skills/yss-cache/references/annotations.md +3 -1
- package/template/.agents/skills/yss-cache/references/architecture.md +4 -2
- package/template/.agents/skills/yss-cache/references/configuration.md +6 -3
- package/template/.agents/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.agents/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.agents/skills/yss-cache/references/verification.md +10 -4
- package/template/.agents/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.agents/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.agents/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.agents/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.agents/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +68 -5
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.agents/skills/yss-repository/SKILL.md +1 -0
- package/template/.agents/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/.codex/skills/yss-cache/SKILL.md +6 -5
- package/template/.codex/skills/yss-cache/references/annotations.md +3 -1
- package/template/.codex/skills/yss-cache/references/architecture.md +4 -2
- package/template/.codex/skills/yss-cache/references/configuration.md +6 -3
- package/template/.codex/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.codex/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.codex/skills/yss-cache/references/verification.md +10 -4
- package/template/.codex/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.codex/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.codex/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.codex/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.codex/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +68 -5
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.codex/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.codex/skills/yss-repository/SKILL.md +1 -0
- package/template/.codex/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/.cursor/skills/yss-cache/SKILL.md +6 -5
- package/template/.cursor/skills/yss-cache/references/annotations.md +3 -1
- package/template/.cursor/skills/yss-cache/references/architecture.md +4 -2
- package/template/.cursor/skills/yss-cache/references/configuration.md +6 -3
- package/template/.cursor/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.cursor/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.cursor/skills/yss-cache/references/verification.md +10 -4
- package/template/.cursor/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.cursor/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.cursor/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.cursor/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.cursor/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +68 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.cursor/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.cursor/skills/yss-repository/SKILL.md +1 -0
- package/template/.cursor/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/.pi/skills/yss-cache/SKILL.md +6 -5
- package/template/.pi/skills/yss-cache/references/annotations.md +3 -1
- package/template/.pi/skills/yss-cache/references/architecture.md +4 -2
- package/template/.pi/skills/yss-cache/references/configuration.md +6 -3
- package/template/.pi/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.pi/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.pi/skills/yss-cache/references/verification.md +10 -4
- package/template/.pi/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.pi/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.pi/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.pi/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.pi/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +68 -5
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.pi/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.pi/skills/yss-repository/SKILL.md +1 -0
- package/template/.pi/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/AGENTS.md +2 -0
- package/template/CONTEXT.md +2 -1
- package/template/README.md +3 -5
- package/template/docs/agents/issue-tracker.md +7 -0
- package/template/docs/agents/skill-migrations.md +4 -0
- package/template/docs/agents/yss-skill-registry.yaml +7 -6
- package/template/docs/design/README.md +0 -1
- package/template/docs/design/design.md +2 -2
- package/template/docs/design/templates/interaction-spec-template.md +1 -1
- package/template/docs/engineering/evidence/aliyun-artifact-resolution.json +446 -0
- package/template/docs/process/contract-reading.md +46 -0
- package/template/docs/process/lifecycle-artifact-map.md +2 -2
- package/template/docs/process/lifecycle-registry-baseline.json +2 -1
- package/template/docs/process/lifecycle-registry.yaml +10 -4
- package/template/docs/process/schemas/api-contract-decision-v2.schema.json +198 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +8 -0
- package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +259 -0
- package/template/docs/process/schemas/stage-tracking.schema.json +259 -0
- package/template/docs/process/stage-tracking.md +62 -0
- package/template/docs/process/strategic-handoff-package.md +8 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +2 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +1 -0
- package/template/docs/user-guide//351/230/266/346/256/265/346/216/245/345/205/245/344/270/216/344/272/247/347/211/251/345/244/215/347/224/250/344/275/277/347/224/250/346/211/213/345/206/214.md +243 -0
- package/template/scripts/api-contract-decision +16 -0
- package/template/scripts/complete-backend-delivery +17 -0
- package/template/scripts/contract +13 -0
- package/template/scripts/design-md +2 -0
- package/template/scripts/dispatch-slice-task +13 -0
- package/template/scripts/lib/api-contract-decision.mjs +45 -4
- package/template/scripts/lib/approval-record.mjs +1 -1
- package/template/scripts/lib/approved-execution-context.mjs +35 -7
- package/template/scripts/lib/backend-architecture.mjs +2 -2
- package/template/scripts/lib/backend-delivery-terminal.mjs +51 -0
- package/template/scripts/lib/backend-platform-provenance.mjs +1 -1
- package/template/scripts/lib/backend-platform.mjs +1 -1
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
- package/template/scripts/lib/context-contract.mjs +1 -1
- package/template/scripts/lib/context-reconciliation.mjs +1 -1
- package/template/scripts/lib/contract-source.mjs +22 -0
- package/template/scripts/lib/contract-views.mjs +109 -0
- package/template/scripts/lib/delivery-preflight.mjs +3 -2
- package/template/scripts/lib/design-md.mjs +230 -0
- package/template/scripts/lib/digital-human-roles.mjs +1 -1
- package/template/scripts/lib/existing-backend-architecture.mjs +4 -3
- package/template/scripts/lib/existing-ui-baseline.mjs +4 -2
- package/template/scripts/lib/frontend-delivery-boundary.mjs +1 -1
- package/template/scripts/lib/frontend-delivery.mjs +1 -1
- package/template/scripts/lib/harness-execution-scope.mjs +15 -1
- package/template/scripts/lib/implementation-contract-compiler.mjs +4 -4
- package/template/scripts/lib/json-schema.mjs +19 -4
- package/template/scripts/lib/lifecycle-context-query.mjs +5 -1
- package/template/scripts/lib/lifecycle-controls.mjs +1 -1
- package/template/scripts/lib/lifecycle-execution-scope.mjs +92 -0
- package/template/scripts/lib/lifecycle-registry.mjs +2 -1
- package/template/scripts/lib/lifecycle-transition.mjs +21 -3
- package/template/scripts/lib/openapi-draft-validation.mjs +2 -1
- package/template/scripts/lib/skill-registry.mjs +10 -3
- package/template/scripts/lib/skill-supply-chain.mjs +33 -14
- package/template/scripts/lib/slice-contract-preparation.mjs +16 -14
- package/template/scripts/lib/slice-contract-views.mjs +1 -1
- package/template/scripts/lib/slice-contract.mjs +18 -3
- package/template/scripts/lib/slice-execution-preflight.mjs +7 -3
- package/template/scripts/lib/slice-repositories.mjs +1 -1
- package/template/scripts/lib/slice-task-package.mjs +3 -2
- package/template/scripts/lib/stage-tracking-migration.mjs +176 -0
- package/template/scripts/lib/stage-tracking.mjs +184 -0
- package/template/scripts/lib/strategic-handoff-consumption.mjs +5 -4
- package/template/scripts/lib/strategic-handoff-io.mjs +5 -2
- package/template/scripts/lib/strategic-handoff-routing.mjs +31 -0
- package/template/scripts/lib/strategic-handoff.mjs +4 -2
- package/template/scripts/lib/task-package.mjs +2 -0
- package/template/scripts/lib/technical-design-boundary.mjs +4 -2
- package/template/scripts/lib/ui-baseline.mjs +1 -1
- package/template/scripts/lib/user-decision.mjs +1 -1
- package/template/scripts/lib/validation-phase.mjs +72 -0
- package/template/scripts/stage-tracking +25 -0
- package/template/scripts/strategic-consumer-entry +47 -0
- package/template/scripts/verify-context-reconciliation +4 -3
- package/template/scripts/verify-lifecycle-checkpoint +10 -0
- package/template/scripts/verify-project-instance +11 -10
- package/template/skills-lock.json +17 -32
- package/template.manifest.json +18 -3
- package/template.snapshot.json +5 -5
- package/template/.agents/skills/grill-me/SKILL.md +0 -7
- package/template/.agents/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.agents/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.agents/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/.codex/skills/grill-me/SKILL.md +0 -7
- package/template/.codex/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.codex/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.codex/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/.cursor/skills/grill-me/SKILL.md +0 -7
- package/template/.cursor/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.cursor/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.cursor/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/.pi/skills/grill-me/SKILL.md +0 -7
- package/template/.pi/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.pi/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.pi/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/docs/agents/yss-plugin-dependency-contract.md +0 -45
- package/template/docs/api/.gitkeep +0 -0
- package/template/docs/api/specs/.gitkeep +0 -0
- package/template/docs/architecture/.gitkeep +0 -0
- package/template/docs/design/facts/antdv-next/1.5.2/cli-help.txt +0 -38
- package/template/docs/design/facts/antdv-next/1.5.2/component-list.json +0 -434
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/info.json +0 -246
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/semantic.json +0 -40
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/token.json +0 -32
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/info.json +0 -190
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/semantic.json +0 -20
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/token.json +0 -256
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/info.json +0 -460
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/semantic.json +0 -70
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/token.json +0 -123
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/info.json +0 -646
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/semantic.json +0 -50
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/token.json +0 -130
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/info.json +0 -640
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/semantic.json +0 -70
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/token.json +0 -172
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/info.json +0 -1010
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/semantic.json +0 -70
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/token.json +0 -263
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/info.json +0 -321
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/semantic.json +0 -25
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/token.json +0 -25
- package/template/docs/design/facts/antdv-next/1.5.2/design-md.json +0 -3
- package/template/docs/design/facts/antdv-next/1.5.2/manifest.json +0 -215
- package/template/docs/design/facts/antdv-next/1.5.2/resolution-probe.json +0 -5
- package/template/docs/design/prototypes/.gitkeep +0 -1
- package/template/docs/implementation/.gitkeep +0 -1
- package/template/docs/plan/IDEATION.md +0 -96
- package/template/docs/process/PDCA-SCRUM.md +0 -10
- package/template/docs/process/harness-executive-blueprint.md +0 -10
- package/template/docs/releases/.gitkeep +0 -1
- package/template/docs/requirements/README.md +0 -85
- package/template/docs/requirements/tickets/.gitkeep +0 -1
- package/template/docs/templates/agent-brief-template.md +0 -46
- package/template/docs/templates/architecture-proposal-template.md +0 -18
- package/template/docs/templates/implementation-plan-template.md +0 -16
- package/template/docs/templates/implementation-routing-template.md +0 -350
- package/template/docs/templates/requirement-freeze-template.md +0 -63
- package/template/docs/templates/risk-register-template.md +0 -11
- package/template/docs/templates/user-story-template.md +0 -20
- package/template/docs/testing/README.md +0 -110
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"revision": "c4d958f18cc947cb91cbe1bd48783fa4601cc18f"
|
|
19
19
|
},
|
|
20
20
|
"iloveZzz/yss-harness-design-agent": {
|
|
21
|
-
"revision": "
|
|
21
|
+
"revision": "9b579c7b954c153d2347696f53123aebaccde48f"
|
|
22
22
|
},
|
|
23
23
|
"ayghri/i-have-adhd": {
|
|
24
24
|
"revision": "7b9069b39972e269e61bd95c2f66ebb90cac6a02"
|
|
@@ -226,21 +226,6 @@
|
|
|
226
226
|
".pi/skills"
|
|
227
227
|
]
|
|
228
228
|
},
|
|
229
|
-
"grill-me": {
|
|
230
|
-
"source": "mattpocock/skills",
|
|
231
|
-
"sourceType": "github",
|
|
232
|
-
"skillPath": "skills/productivity/grill-me/SKILL.md",
|
|
233
|
-
"effectiveHash": "916cf7ff0d81cf47fe578bd86695e09a53fbe8a4b371586e19dde6573549e88d",
|
|
234
|
-
"sourceRevision": "0ab1b63a410a03d3627979a109c8695de27af954",
|
|
235
|
-
"upstreamHash": "5a13e157f85835632b132390a162d234822658b6a544f31cc2578280062bd044",
|
|
236
|
-
"adaptationRef": "docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md",
|
|
237
|
-
"targets": [
|
|
238
|
-
".agents/skills",
|
|
239
|
-
".codex/skills",
|
|
240
|
-
".cursor/skills",
|
|
241
|
-
".pi/skills"
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
229
|
"grill-with-docs": {
|
|
245
230
|
"source": "mattpocock/skills",
|
|
246
231
|
"sourceType": "github",
|
|
@@ -425,7 +410,7 @@
|
|
|
425
410
|
"sourceType": "git-submodule",
|
|
426
411
|
"skillPath": ".agents/skills/prototype-review/SKILL.md",
|
|
427
412
|
"effectiveHash": "410ed10f248f6eb396cd50cea905032e45ec9b203aad41dbf78dbd03aba84b55",
|
|
428
|
-
"sourceRevision": "
|
|
413
|
+
"sourceRevision": "9b579c7b954c153d2347696f53123aebaccde48f",
|
|
429
414
|
"upstreamHash": "6df02dd4de236a749a80efd5eba46d18be7979849af2a9af28636906ccfcb2a0",
|
|
430
415
|
"adaptationRef": "docs/agents/strategic-design-skills-integration.md",
|
|
431
416
|
"targets": [
|
|
@@ -682,7 +667,7 @@
|
|
|
682
667
|
"source": "project",
|
|
683
668
|
"sourceType": "local",
|
|
684
669
|
"skillPath": ".agents/skills/yss-cache/SKILL.md",
|
|
685
|
-
"effectiveHash": "
|
|
670
|
+
"effectiveHash": "64a24a5108feae462d5cf53d2892a27e9ae00c552e6a184f8b59c7dcafe9b62d",
|
|
686
671
|
"targets": [
|
|
687
672
|
".agents/skills",
|
|
688
673
|
".codex/skills",
|
|
@@ -707,7 +692,7 @@
|
|
|
707
692
|
"sourceType": "git-submodule",
|
|
708
693
|
"skillPath": ".agents/skills/yss-design-system/SKILL.md",
|
|
709
694
|
"effectiveHash": "b3ddbff30926f6675ac60cbf89182593df7ed272d7a1dc75f657f7640960c1b8",
|
|
710
|
-
"sourceRevision": "
|
|
695
|
+
"sourceRevision": "9b579c7b954c153d2347696f53123aebaccde48f",
|
|
711
696
|
"upstreamHash": "e156229435c35827c48d3699b021e5e171ec565c2bf91cc91cbb033bf7802d7c",
|
|
712
697
|
"adaptationRef": "docs/agents/strategic-design-skills-integration.md",
|
|
713
698
|
"targets": [
|
|
@@ -721,7 +706,7 @@
|
|
|
721
706
|
"source": "project",
|
|
722
707
|
"sourceType": "local",
|
|
723
708
|
"skillPath": ".agents/skills/yss-distributed-id/SKILL.md",
|
|
724
|
-
"effectiveHash": "
|
|
709
|
+
"effectiveHash": "d7e61711f9ccc8a1f5a7c768f4016cd57bbcd3ff9d5fc0375c550ea387a68d31",
|
|
725
710
|
"targets": [
|
|
726
711
|
".agents/skills",
|
|
727
712
|
".codex/skills",
|
|
@@ -832,7 +817,7 @@
|
|
|
832
817
|
"source": "project",
|
|
833
818
|
"sourceType": "local",
|
|
834
819
|
"skillPath": ".agents/skills/yss-implementation-contract-compiler/SKILL.md",
|
|
835
|
-
"effectiveHash": "
|
|
820
|
+
"effectiveHash": "68cc10eaedad5ff77e48f1d75b7bb37de46b0f250dcd18a7deb6c8d9e64d6035",
|
|
836
821
|
"targets": [
|
|
837
822
|
".agents/skills",
|
|
838
823
|
".codex/skills",
|
|
@@ -856,7 +841,7 @@
|
|
|
856
841
|
"source": "project",
|
|
857
842
|
"sourceType": "local",
|
|
858
843
|
"skillPath": ".agents/skills/yss-mybatis/SKILL.md",
|
|
859
|
-
"effectiveHash": "
|
|
844
|
+
"effectiveHash": "59cc457511213d05c1cd5a035f41f22ca14d77f296be7e7a4ccc9067f0f158b3",
|
|
860
845
|
"targets": [
|
|
861
846
|
".agents/skills",
|
|
862
847
|
".codex/skills",
|
|
@@ -868,7 +853,7 @@
|
|
|
868
853
|
"source": "project",
|
|
869
854
|
"sourceType": "local",
|
|
870
855
|
"skillPath": ".agents/skills/yss-openapi-draft-review/SKILL.md",
|
|
871
|
-
"effectiveHash": "
|
|
856
|
+
"effectiveHash": "d4ff53b34a41c852f5f7ac0b9c0d2f70ca8a027e04a9622f7c0770683a0ab69d",
|
|
872
857
|
"targets": [
|
|
873
858
|
".agents/skills",
|
|
874
859
|
".codex/skills",
|
|
@@ -880,7 +865,7 @@
|
|
|
880
865
|
"source": "project",
|
|
881
866
|
"sourceType": "local",
|
|
882
867
|
"skillPath": ".agents/skills/yss-openapi-governance/SKILL.md",
|
|
883
|
-
"effectiveHash": "
|
|
868
|
+
"effectiveHash": "d00b62edef550e2d8c066ce8aa034422bd00825adcc15b6b0953dff7d23af4c0",
|
|
884
869
|
"targets": [
|
|
885
870
|
".agents/skills",
|
|
886
871
|
".codex/skills",
|
|
@@ -892,7 +877,7 @@
|
|
|
892
877
|
"source": "project",
|
|
893
878
|
"sourceType": "local",
|
|
894
879
|
"skillPath": ".agents/skills/yss-product-lifecycle/SKILL.md",
|
|
895
|
-
"effectiveHash": "
|
|
880
|
+
"effectiveHash": "509c9a2b5bbb8e4c1a0b72bd59e75ef3cde0d70452a0c9d7ffa5864a737814ba",
|
|
896
881
|
"targets": [
|
|
897
882
|
".agents/skills",
|
|
898
883
|
".codex/skills",
|
|
@@ -904,8 +889,8 @@
|
|
|
904
889
|
"source": "iloveZzz/yss-harness-design-agent",
|
|
905
890
|
"sourceType": "git-submodule",
|
|
906
891
|
"skillPath": ".agents/skills/yss-prototype-stage/SKILL.md",
|
|
907
|
-
"effectiveHash": "
|
|
908
|
-
"sourceRevision": "
|
|
892
|
+
"effectiveHash": "ac8390003dd1cf661cf01f9b13fdb37f16463810af0c74fe9a8428cc569a5167",
|
|
893
|
+
"sourceRevision": "9b579c7b954c153d2347696f53123aebaccde48f",
|
|
909
894
|
"upstreamHash": "6e1bcdf107d95c11faee2b988e4e0c36b8e5b76f6b40312a206b83733a96b0fc",
|
|
910
895
|
"adaptationRef": "docs/agents/strategic-design-skills-integration.md",
|
|
911
896
|
"targets": [
|
|
@@ -919,7 +904,7 @@
|
|
|
919
904
|
"source": "project",
|
|
920
905
|
"sourceType": "local",
|
|
921
906
|
"skillPath": ".agents/skills/yss-repository/SKILL.md",
|
|
922
|
-
"effectiveHash": "
|
|
907
|
+
"effectiveHash": "4c67dbfa563761b60668e4622ae7043ded94458f29b2ad0525fd53fa6c98d672",
|
|
923
908
|
"targets": [
|
|
924
909
|
".agents/skills",
|
|
925
910
|
".codex/skills",
|
|
@@ -982,8 +967,8 @@
|
|
|
982
967
|
"source": "iloveZzz/yss-harness-design-agent",
|
|
983
968
|
"sourceType": "git-submodule",
|
|
984
969
|
"skillPath": ".agents/skills/yss-stage-decision/SKILL.md",
|
|
985
|
-
"effectiveHash": "
|
|
986
|
-
"sourceRevision": "
|
|
970
|
+
"effectiveHash": "43a83bc02fea3c36105be6791ad019036b7ea1a17e5f0704daf93fb7be29b60b",
|
|
971
|
+
"sourceRevision": "9b579c7b954c153d2347696f53123aebaccde48f",
|
|
987
972
|
"upstreamHash": "f7f765e20f4dca6aca667be03e2b9a7f2a8acc3510eefba88306961882d86ed4",
|
|
988
973
|
"adaptationRef": "docs/agents/strategic-design-skills-integration.md",
|
|
989
974
|
"targets": [
|
|
@@ -997,7 +982,7 @@
|
|
|
997
982
|
"source": "project",
|
|
998
983
|
"sourceType": "local",
|
|
999
984
|
"skillPath": ".agents/skills/yss-tactical-design/SKILL.md",
|
|
1000
|
-
"effectiveHash": "
|
|
985
|
+
"effectiveHash": "c4a519d1faef1de31c85a9bfae0b5b3888432da68470bb23a434be8751164548",
|
|
1001
986
|
"targets": [
|
|
1002
987
|
".agents/skills",
|
|
1003
988
|
".codex/skills",
|
|
@@ -1009,7 +994,7 @@
|
|
|
1009
994
|
"source": "project",
|
|
1010
995
|
"sourceType": "local",
|
|
1011
996
|
"skillPath": ".agents/skills/yss-technical-design/SKILL.md",
|
|
1012
|
-
"effectiveHash": "
|
|
997
|
+
"effectiveHash": "0b701b6a323a227bf4be9201661039f70760ded9c5dcbda594f5bc6d18226fcd",
|
|
1013
998
|
"targets": [
|
|
1014
999
|
".agents/skills",
|
|
1015
1000
|
".codex/skills",
|
package/template.manifest.json
CHANGED
|
@@ -101,11 +101,26 @@
|
|
|
101
101
|
".gitignore",
|
|
102
102
|
"AGENTS.md",
|
|
103
103
|
"README.md",
|
|
104
|
+
"skills-lock.json",
|
|
105
|
+
"docs/user-guide/用户手册.md",
|
|
106
|
+
"docs/user-guide/用户手册索引.md",
|
|
107
|
+
"docs/user-guide/阶段接入与产物复用使用手册.md",
|
|
108
|
+
"docs/user-guide/技术设计用户指南.md",
|
|
109
|
+
"docs/design/README.md",
|
|
110
|
+
"docs/engineering/backend-platforms.json",
|
|
111
|
+
"scripts/lib/skill-supply-chain.mjs",
|
|
112
|
+
"docs/agents/backend-architecture-profiles.md",
|
|
113
|
+
".agents/skills/yss-design-system/SKILL.md",
|
|
114
|
+
".agents/skills/yss-design-system/references/data-quality-theme.md",
|
|
115
|
+
".codex/skills/yss-design-system/SKILL.md",
|
|
116
|
+
".codex/skills/yss-design-system/references/data-quality-theme.md",
|
|
117
|
+
".cursor/skills/yss-design-system/SKILL.md",
|
|
118
|
+
".cursor/skills/yss-design-system/references/data-quality-theme.md",
|
|
119
|
+
".pi/skills/yss-design-system/SKILL.md",
|
|
120
|
+
".pi/skills/yss-design-system/references/data-quality-theme.md",
|
|
104
121
|
"yss-project.yaml"
|
|
105
122
|
],
|
|
106
|
-
"exampleDocPaths": [
|
|
107
|
-
"docs/plan/IDEATION.md"
|
|
108
|
-
],
|
|
123
|
+
"exampleDocPaths": [],
|
|
109
124
|
"initExcludeRootEntries": [],
|
|
110
125
|
"initExcludeRootFiles": [
|
|
111
126
|
"yss-public-skills.json"
|
package/template.snapshot.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"templateName": "yss-spec-project-template",
|
|
4
4
|
"templateSource": "github:iloveZzz/yss-spec-project-template",
|
|
5
5
|
"templateRepository": "https://github.com/iloveZzz/yss-spec-project-template.git",
|
|
6
|
-
"requestedRef": "
|
|
7
|
-
"templateCommit": "
|
|
6
|
+
"requestedRef": "085a80540035c6430a2dff1fb3fb7396469152df",
|
|
7
|
+
"templateCommit": "085a80540035c6430a2dff1fb3fb7396469152df",
|
|
8
8
|
"sourceState": "committed",
|
|
9
|
-
"manifestHash": "
|
|
9
|
+
"manifestHash": "d60babd9ea2ec16ee054c0c3f467379ba42915b348e1a0451c2975a60c4496d0",
|
|
10
10
|
"encodedPaths": {
|
|
11
11
|
".agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.gitignore": ".agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore",
|
|
12
12
|
".codex/skills/data-analytics/.gitignore": ".codex/skills/data-analytics/__yss_dotfile__.gitignore",
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
".gitignore": "__yss_dotfile__.gitignore",
|
|
18
18
|
".pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.gitignore": ".pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore"
|
|
19
19
|
},
|
|
20
|
-
"snapshotHash": "
|
|
21
|
-
"generatedAt": "2026-09-
|
|
20
|
+
"snapshotHash": "11dfca9873c856b70ec0ae6309e9e391143c4fc102a92553bd118b19640ead16",
|
|
21
|
+
"generatedAt": "2026-09-24T13:20:11.384Z"
|
|
22
22
|
}
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
package com.yss.cloud.sankuai.mybatis;
|
|
2
|
-
|
|
3
|
-
import com.baomidou.mybatisplus.annotation.IdType;
|
|
4
|
-
import com.baomidou.mybatisplus.annotation.TableId;
|
|
5
|
-
import com.baomidou.mybatisplus.annotation.TableName;
|
|
6
|
-
import com.yss.cloud.exception.BizException;
|
|
7
|
-
import com.yss.cloud.sankuai.CosidSegmentContextHelper;
|
|
8
|
-
import com.yss.cloud.sankuai.GenerationTypeSeq;
|
|
9
|
-
import com.yss.cloud.sankuai.SegmentContextHelper;
|
|
10
|
-
import com.yss.cloud.sankuai.SnowflakeContextHelper;
|
|
11
|
-
import lombok.extern.slf4j.Slf4j;
|
|
12
|
-
import org.apache.commons.lang3.StringUtils;
|
|
13
|
-
import org.apache.ibatis.binding.BindingException;
|
|
14
|
-
import org.apache.ibatis.binding.MapperMethod;
|
|
15
|
-
import org.apache.ibatis.executor.statement.StatementHandler;
|
|
16
|
-
import org.apache.ibatis.mapping.BoundSql;
|
|
17
|
-
import org.apache.ibatis.plugin.Interceptor;
|
|
18
|
-
import org.apache.ibatis.plugin.Intercepts;
|
|
19
|
-
import org.apache.ibatis.plugin.Invocation;
|
|
20
|
-
import org.apache.ibatis.plugin.Signature;
|
|
21
|
-
import org.springframework.util.ObjectUtils;
|
|
22
|
-
import org.springframework.util.ReflectionUtils;
|
|
23
|
-
|
|
24
|
-
import javax.persistence.Entity;
|
|
25
|
-
import javax.persistence.GeneratedValue;
|
|
26
|
-
import javax.persistence.Table;
|
|
27
|
-
import java.lang.reflect.Field;
|
|
28
|
-
import java.sql.Connection;
|
|
29
|
-
import java.util.*;
|
|
30
|
-
|
|
31
|
-
@Intercepts(
|
|
32
|
-
{
|
|
33
|
-
@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class})
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
@Slf4j
|
|
37
|
-
public class AutoIdInterceptor implements Interceptor {
|
|
38
|
-
|
|
39
|
-
@Override
|
|
40
|
-
public Object intercept(Invocation invocation) throws Throwable {
|
|
41
|
-
StatementHandler statementHandler = (StatementHandler) invocation.getTarget();
|
|
42
|
-
BoundSql boundSql = statementHandler.getBoundSql();
|
|
43
|
-
String boundSqlStr = boundSql.getSql();
|
|
44
|
-
if (StringUtils.startsWithIgnoreCase(StringUtils.trim(boundSqlStr),"INSERT")){
|
|
45
|
-
processInsertStatement(statementHandler);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return invocation.proceed();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* 1.处理插入的情况
|
|
53
|
-
*
|
|
54
|
-
* @apiNote 1.处理新增insert
|
|
55
|
-
* @param statementHandler 句柄
|
|
56
|
-
*/
|
|
57
|
-
private void processInsertStatement(StatementHandler statementHandler) {
|
|
58
|
-
BoundSql boundSql = statementHandler.getBoundSql();
|
|
59
|
-
Object parameterObject = boundSql.getParameterObject();
|
|
60
|
-
|
|
61
|
-
if (parameterObject != null) {
|
|
62
|
-
processParameterObject(parameterObject);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* 处理参数对象
|
|
68
|
-
*
|
|
69
|
-
* @apiNote 2.处理参数对象 mapper->entityList,plus->param1
|
|
70
|
-
* @param parameterObject 参数对象
|
|
71
|
-
*/
|
|
72
|
-
private void processParameterObject(Object parameterObject) {
|
|
73
|
-
if (parameterObject instanceof MapperMethod.ParamMap<?>){
|
|
74
|
-
// 获取批量实体对象,若为空则为single 参数对象
|
|
75
|
-
Object entityList = null;
|
|
76
|
-
try {
|
|
77
|
-
entityList = ((MapperMethod.ParamMap<?>) parameterObject).get("entityList");
|
|
78
|
-
}catch (BindingException e){
|
|
79
|
-
log.warn("non entityList. info -> {}",e.getLocalizedMessage());
|
|
80
|
-
}
|
|
81
|
-
// 兼容mybatis默认参数 集合的场景
|
|
82
|
-
if (ObjectUtils.isEmpty(entityList)){
|
|
83
|
-
try {
|
|
84
|
-
entityList = ((MapperMethod.ParamMap<?>) parameterObject).get("collection");
|
|
85
|
-
}catch (BindingException e){
|
|
86
|
-
log.warn("non entityList & non collection. info -> {}",e.getLocalizedMessage());
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
// 兼容mybatis默认参数 数组的场景
|
|
90
|
-
if (ObjectUtils.isEmpty(entityList)){
|
|
91
|
-
try {
|
|
92
|
-
entityList = ((MapperMethod.ParamMap<?>) parameterObject).get("array");
|
|
93
|
-
}catch (BindingException e){
|
|
94
|
-
log.warn("non entityList & non collection & non array. info -> {}",e.getLocalizedMessage());
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (ObjectUtils.isEmpty(entityList)){
|
|
98
|
-
try {
|
|
99
|
-
entityList = ((MapperMethod.ParamMap<?>) parameterObject).get("param1");
|
|
100
|
-
}catch (BindingException e){
|
|
101
|
-
log.error("non param1. info -> {}",e.getLocalizedMessage());
|
|
102
|
-
throw new BizException("FeignAutoIdInterceptor run error");
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (entityList instanceof List) {
|
|
106
|
-
// 批量插入
|
|
107
|
-
List<?> el = (List<?>) entityList;
|
|
108
|
-
for (Object entity : el) {
|
|
109
|
-
processEntity(entity);
|
|
110
|
-
}
|
|
111
|
-
} else if (entityList.getClass().isArray()) {
|
|
112
|
-
// 批量插入
|
|
113
|
-
Object[] array = (Object[]) entityList;
|
|
114
|
-
for (Object entity : array) {
|
|
115
|
-
processEntity(entity);
|
|
116
|
-
}
|
|
117
|
-
}else {
|
|
118
|
-
// 单独插入
|
|
119
|
-
processEntity(entityList);
|
|
120
|
-
}
|
|
121
|
-
} else {
|
|
122
|
-
// 单独插入
|
|
123
|
-
processEntity(parameterObject);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* 3.处理对象实体
|
|
129
|
-
*
|
|
130
|
-
* @apiNote 3.处理对象实体
|
|
131
|
-
* @param entity 对象实体
|
|
132
|
-
*/
|
|
133
|
-
private void processEntity(Object entity) {
|
|
134
|
-
Class<?> entityClass = entity.getClass();
|
|
135
|
-
if (isEntityClass(entityClass)) {
|
|
136
|
-
autoIdSet(entity);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* 4.自动为实体设置id
|
|
142
|
-
*
|
|
143
|
-
* @apiNote 4.自动为实体设置id
|
|
144
|
-
* @param entity 对象实体
|
|
145
|
-
*/
|
|
146
|
-
private void autoIdSet(Object entity) {
|
|
147
|
-
Class<?> entityClass = entity.getClass();
|
|
148
|
-
List<Field> fields = getAllFields(entityClass);
|
|
149
|
-
for (Field field : fields) {
|
|
150
|
-
|
|
151
|
-
if (field.isAnnotationPresent(GeneratedValue.class)||
|
|
152
|
-
field.isAnnotationPresent(TableId.class)) {
|
|
153
|
-
processGeneratedValue(entity, field);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* 5.设置id字段
|
|
160
|
-
*
|
|
161
|
-
* @param entity 实体对象
|
|
162
|
-
* @param field id字段
|
|
163
|
-
*/
|
|
164
|
-
private void processGeneratedValue(Object entity, Field field) {
|
|
165
|
-
String genIdType = getGenIdType(field);
|
|
166
|
-
|
|
167
|
-
String tableName = getTableName(entity);
|
|
168
|
-
|
|
169
|
-
if (Objects.nonNull(genIdType)&&
|
|
170
|
-
Objects.nonNull(SegmentContextHelper.LeafConf())&&
|
|
171
|
-
SegmentContextHelper.LeafConf().isLeafSegmentEnable()&&
|
|
172
|
-
(genIdType.equals(GenerationTypeSeq.SEGMENT) || genIdType.equals(IdType.AUTO.name()) || genIdType.equals(IdType.ASSIGN_ID.name()))) {
|
|
173
|
-
long idValue = SegmentContextHelper.nextId(tableName);
|
|
174
|
-
setFieldValue(entity, field, idValue);
|
|
175
|
-
} else if (Objects.nonNull(genIdType)&&
|
|
176
|
-
Objects.nonNull(SnowflakeContextHelper.LeafConf())&&
|
|
177
|
-
SnowflakeContextHelper.LeafConf().isLeafSnowflakeEnable()
|
|
178
|
-
&&genIdType.equals(GenerationTypeSeq.SNOWFLAKE) ) {
|
|
179
|
-
long idValue = SnowflakeContextHelper.nextId();
|
|
180
|
-
setFieldValue(entity, field, idValue);
|
|
181
|
-
} else if (Objects.nonNull(genIdType)&&
|
|
182
|
-
(genIdType.equals(GenerationTypeSeq.UUID)|| genIdType.equals(IdType.ASSIGN_UUID.name()))) {
|
|
183
|
-
String idValue = UUID.randomUUID().toString();
|
|
184
|
-
setFieldValue(entity, field, idValue);
|
|
185
|
-
} else if (Objects.nonNull(genIdType) &&
|
|
186
|
-
genIdType.equals(GenerationTypeSeq.COSID_SEGMENT)) {
|
|
187
|
-
long idValue = CosidSegmentContextHelper.nextId(tableName);
|
|
188
|
-
setFieldValue(entity, field, idValue);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
private void setFieldValue(Object entity, Field field, Object value) {
|
|
193
|
-
field.setAccessible(true);
|
|
194
|
-
// 如果value为null,则ID生成服务不可用,使用默认规则替代;有值则覆盖
|
|
195
|
-
if(!Objects.isNull(value)) {
|
|
196
|
-
if (field.getType() == String.class) {
|
|
197
|
-
ReflectionUtils.setField(field,entity,String.valueOf(value));
|
|
198
|
-
} else if (field.getType() == Integer.class) {
|
|
199
|
-
ReflectionUtils.setField(field,entity,Integer.valueOf(String.valueOf(value)));
|
|
200
|
-
} else {
|
|
201
|
-
ReflectionUtils.setField(field,entity,value);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
private boolean isEntityClass(Class<?> clazz) {
|
|
207
|
-
return clazz.isAnnotationPresent(Entity.class)||clazz.isAnnotationPresent(TableName.class);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
private String getTableName(Object entity){
|
|
211
|
-
Table table = entity.getClass().getAnnotation(Table.class);
|
|
212
|
-
if (Objects.nonNull(table)){
|
|
213
|
-
return table.name();
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
TableName tableName = entity.getClass().getAnnotation(TableName.class);
|
|
217
|
-
|
|
218
|
-
if (Objects.nonNull(tableName)){
|
|
219
|
-
return tableName.value();
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
return null;
|
|
223
|
-
}
|
|
224
|
-
private static List<Field> getAllFields(Class<?> clazz) {
|
|
225
|
-
List<Field> fields = new ArrayList<>();
|
|
226
|
-
while (clazz != null) {
|
|
227
|
-
Collections.addAll(fields, clazz.getDeclaredFields());
|
|
228
|
-
clazz = clazz.getSuperclass();
|
|
229
|
-
}
|
|
230
|
-
return fields;
|
|
231
|
-
}
|
|
232
|
-
private String getGenIdType(Field field){
|
|
233
|
-
GeneratedValue generatedValueAnnotation = field.getAnnotation(GeneratedValue.class);
|
|
234
|
-
|
|
235
|
-
if (Objects.nonNull(generatedValueAnnotation)){
|
|
236
|
-
return generatedValueAnnotation.generator();
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
TableId tableId = field.getAnnotation(TableId.class);
|
|
240
|
-
|
|
241
|
-
if (Objects.nonNull(tableId)){
|
|
242
|
-
return tableId.type().name();
|
|
243
|
-
}
|
|
244
|
-
return null;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
package com.yss.cloud;
|
|
2
|
-
|
|
3
|
-
import com.yss.cloud.sankuai.config.LeafConf;
|
|
4
|
-
import com.yss.cloud.sankuai.config.LeafDataSourceConfiguration;
|
|
5
|
-
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
6
|
-
import org.springframework.context.annotation.Import;
|
|
7
|
-
|
|
8
|
-
import java.lang.annotation.*;
|
|
9
|
-
|
|
10
|
-
@Target({ElementType.TYPE})
|
|
11
|
-
@Retention(RetentionPolicy.RUNTIME)
|
|
12
|
-
@Documented
|
|
13
|
-
@Inherited
|
|
14
|
-
@Import({LeafDataSourceConfiguration.class, EnableDistributedImportSelector.class})
|
|
15
|
-
@EnableConfigurationProperties(LeafConf.class)
|
|
16
|
-
public @interface EnableDistributedId {
|
|
17
|
-
/**
|
|
18
|
-
* 默认自动装载leaf配置,设置默认启用状态
|
|
19
|
-
*/
|
|
20
|
-
boolean autoRegister() default true;
|
|
21
|
-
/**
|
|
22
|
-
* 是否启用cosid模式
|
|
23
|
-
*/
|
|
24
|
-
boolean cosid() default false;
|
|
25
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
package com.yss.cloud.sankuai.config;
|
|
2
|
-
|
|
3
|
-
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
4
|
-
|
|
5
|
-
@ConfigurationProperties(prefix = "spring.leaf", ignoreInvalidFields = true)
|
|
6
|
-
public class LeafConf {
|
|
7
|
-
private boolean leafSegmentEnable;
|
|
8
|
-
private boolean leafSnowflakeEnable;
|
|
9
|
-
|
|
10
|
-
public boolean isLeafSegmentEnable() {
|
|
11
|
-
return leafSegmentEnable;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public void setLeafSegmentEnable(boolean leafSegmentEnable) {
|
|
15
|
-
this.leafSegmentEnable = leafSegmentEnable;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public boolean isLeafSnowflakeEnable() {
|
|
19
|
-
return leafSnowflakeEnable;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public void setLeafSnowflakeEnable(boolean leafSnowflakeEnable) {
|
|
23
|
-
this.leafSnowflakeEnable = leafSnowflakeEnable;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@Override
|
|
27
|
-
public String toString() {
|
|
28
|
-
return "LeafConf{"
|
|
29
|
-
+ "leafSegmentEnable="
|
|
30
|
-
+ leafSegmentEnable
|
|
31
|
-
+ ", leafSnowflakeEnable="
|
|
32
|
-
+ leafSnowflakeEnable
|
|
33
|
-
+ ", leafSnowflakePort="
|
|
34
|
-
+ '}';
|
|
35
|
-
}
|
|
36
|
-
}
|