fix(deploy): auto-initialize admin before login in sync hooks#236
Merged
Thomas-Eliot merged 1 commit intohigress-group:mainfrom Apr 1, 2026
Merged
Conversation
在 Nacos 同步钩子中增加管理员自动初始化步骤(ensure_admin_initialized), 解决全新安装或重装后 administrator 表为空导致登录失败的问题。 - 新增 ensure_admin_initialized 函数,在登录前幂等地检查并创建管理员 - Docker 和 Helm 两套部署脚本同步更新 - 调整 main 中步骤编号保持一致 🤖 Generated with [Qoder][https://qoder.com]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
在 Nacos 同步钩子(
65-sync-nacos-market.sh)中增加管理员自动初始化步骤,解决全新安装或重装后administrator表为空导致后续登录失败、整个同步流程中断的问题。ensure_admin_initialized函数,在登录前幂等地调用/api/v1/admins/need-init检查状态,必要时调用/api/v1/admins/init创建管理员main函数中步骤编号保持一致🔗 Related Issues
✅ Type of Change
🧪 Testing
📋 Checklist
mvn spotless:applyfor backend,npm run lint:fixfor frontend)