refactor(backend): 重构后端代码 wave 3

This commit is contained in:
sophie committed 2026-07-29 19:12:49 +08:00
1 parent affe139bf9
commit 8415653365
97 files changed
+4673 -6164

No files matched your search

+9 -7
View File
@@ -32,7 +32,7 @@ ENV_FILE="${ROOT_DIR}/.env.${ENV_NAME}"
SHARED_ENV_FILE="${ROOT_DIR}/.env.shared"
ORACLE_CLIENT_DIR="${ROOT_DIR}/oracle_client"
BACKEND_DOCKERFILE="${ROOT_DIR}/backend/Dockerfile"
SCHEMA_DOC_PATH="${ROOT_DIR}/docs/(表+字段).md"
SCHEMA_DOC_PATH="${ROOT_DIR}/docs/integrations/erp/text2sql_schema.md"
ROOT_DOCKERIGNORE="${ROOT_DIR}/.dockerignore"
check_oracle_client() {
@@ -63,7 +63,7 @@ check_backend_build_inputs() {
if [[ ! -f "${SCHEMA_DOC_PATH}" ]]; then
echo "Missing Text2SQL schema doc: ${SCHEMA_DOC_PATH}"
echo "Please ensure docs/(表+字段).md exists in the repository root before building hxops-backend."
echo "Please ensure docs/integrations/erp/text2sql_schema.md exists before building hxops-backend."
exit 1
fi
@@ -75,18 +75,20 @@ check_backend_build_inputs() {
exit 1
fi
if ! grep -Fq 'COPY docs/(表+字段).md /app/docs/(表+字段).md' "${BACKEND_DOCKERFILE}"; then
if ! grep -Fq 'COPY docs/integrations/erp/text2sql_schema.md /app/docs/integrations/erp/text2sql_schema.md' "${BACKEND_DOCKERFILE}"; then
echo "Invalid backend Dockerfile: schema doc is not copied into the image."
echo "Expected line:"
echo " COPY docs/(表+字段).md /app/docs/(表+字段).md"
echo " COPY docs/integrations/erp/text2sql_schema.md /app/docs/integrations/erp/text2sql_schema.md"
exit 1
fi
if [[ -f "${ROOT_DOCKERIGNORE}" ]] && grep -Eq '^(docs|docs/\*)$' "${ROOT_DOCKERIGNORE}"; then
if ! grep -Fxq '!docs/(表+字段).md' "${ROOT_DOCKERIGNORE}"; then
echo "Invalid .dockerignore: docs is excluded but docs/(表+字段).md is not re-included."
if ! grep -Fxq '!docs/integrations/erp/text2sql_schema.md' "${ROOT_DOCKERIGNORE}"; then
echo "Invalid .dockerignore: docs is excluded but the Text2SQL schema is not re-included."
echo "Please add the following line to ${ROOT_DOCKERIGNORE}:"
echo " !docs/(表+字段).md"
echo " !docs/integrations/"
echo " !docs/integrations/erp/"
echo " !docs/integrations/erp/text2sql_schema.md"
exit 1
fi
fi