From 14e583b9f8172980517933fc17814d7b677eb8f7 Mon Sep 17 00:00:00 2001 From: zichun <26684461+reporkey@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:55:28 +0800 Subject: [PATCH] Add saaslocal profile, useful-forms SQL view; make mvnw executable --- mvnw | 0 sql/viw_ai_useful_forms.sql | 39 +++++++++++++++++++++++++++++++++++++++ src/main/resources/application-saaslocal.yml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 0 deletions(-) mode change 100644 => 100755 mvnw create mode 100644 sql/viw_ai_useful_forms.sql create mode 100644 src/main/resources/application-saaslocal.yml diff --git a/mvnw b/mvnw old mode 100644 new mode 100755 index bd8896b..bd8896b --- a/mvnw +++ b/mvnw diff --git a/sql/viw_ai_useful_forms.sql b/sql/viw_ai_useful_forms.sql new file mode 100644 index 0000000..5e35662 --- /dev/null +++ b/sql/viw_ai_useful_forms.sql @@ -0,0 +1,39 @@ +-- ============================================================ +-- 视图:viw_ai_useful_forms —— ERP「有用业务表单」目录 +-- 合并 gdsmodule(菜单窗体) + gdsconfigformmaster(表单配置) +-- 过滤原则:保召回优先,只剔除"必然无用"的项,再用字段让调用方自行收窄 +-- 剔除:失效 / 系统配置源(gds*/sys*) / BI报表 / 首页 / 外链 / 弹窗 / 系统配置窗体 +-- 保留:有业务数据源(表/视图/过程)的表单 +-- 收窄开关(作为字段暴露,不写死在过滤里,避免误删"明细/查询"类窗体): +-- bVisibleMenu = 1 → 主菜单可见的窗体(约370张,精度高) +-- bIsGrid = 1 → 列表/表格型窗体(适合出数据列表) +-- 调接口用法:POST /business/getBusinessDataByFormcustomId/{sFormId}?sModelsId={sModuleId} +-- ============================================================ +CREATE OR REPLACE VIEW viw_ai_useful_forms AS +SELECT + m.sId AS sModuleId, -- 菜单窗体id (= 接口 sModelsId / ai_tool.sSrcFormId) + m.sChinese AS sModuleName, -- 窗体/菜单名称 + m.sModelType AS sModelType, -- 前端路由/业务域(可能为空) + f.sId AS sFormId, -- 表单id (= 接口路径 gdsconfigformmasterId) + f.sChinese AS sFormTitle, -- 表单标题 + f.sTbName AS sDataSource, -- 数据源(表/视图/过程) + f.sType AS sExecType, -- 执行类型 table/view/proc + CAST(f.bGrd AS UNSIGNED) AS bIsGrid, -- 1=列表型窗体, 0=明细型 (收窄开关) + CAST(m.bVisible AS UNSIGNED) AS bVisibleMenu, -- 1=主菜单可见, 0=次级/查询窗体 (收窄开关) + m.iOrder AS iOrder -- 菜单排序 +FROM gdsmodule m +JOIN gdsconfigformmaster f ON f.sParentId = m.sId +WHERE IFNULL(m.bInvalid, 0) = 0 + AND IFNULL(f.sTbName, '') <> '' + AND f.sType IN ('table', 'view', 'proc') + AND f.sTbName NOT LIKE 'gds%' + AND f.sTbName NOT LIKE 'sys%' + AND IFNULL(m.sModelType, '') NOT LIKE 'commonAuto/Bi%' + AND IFNULL(m.sModelType, '') NOT LIKE '%IndexPage' + AND IFNULL(m.sModelType, '') NOT LIKE 'http%' + AND IFNULL(m.sModelType, '') NOT LIKE '%ipAddress%' + AND IFNULL(m.sModelType, '') NOT LIKE 'modal/%' + AND IFNULL(m.sModelType, '') NOT IN ( + 'gdsmodule', 'gdsconfigformmaster', 'gdsconfigtbmaster', + 'gdsformconst', 'gdsjurisdiction', 'gdsconfigcharmaster', 'gdsinterfacemaster' + ); diff --git a/src/main/resources/application-saaslocal.yml b/src/main/resources/application-saaslocal.yml new file mode 100644 index 0000000..578035f --- /dev/null +++ b/src/main/resources/application-saaslocal.yml @@ -0,0 +1,30 @@ +# Local override profile so xlyAi runs against the saas-8s+ local stack on macOS. +# +# Run: JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw spring-boot:run \ +# -Dspring-boot.run.profiles=saaslocal +# +# Only overrides what differs from the committed application.yml (which targets a +# remote Windows deploy). Redis already points at the local shared redis-local +# (127.0.0.1:16379 / db 0) so it is inherited unchanged. Milvus/Ollama stay remote +# — their clients are lazy, so the app boots even if they are unreachable. +logging: + dirpath: /Users/reporkey/Desktop/saas-8s+/logs/xlyAi + +spring: + datasource: + # Local saas DB from docker-compose.saas.yml (mysql-saas, root/local). + url: jdbc:mysql://127.0.0.1:33307/xlyweberp_saas?allowPublicKeyRetrieval=true&keepAlive=true&autoReconnect=true&autoReconnectForPools=true&connectTimeout=30000&socketTimeout=180000&nullCatalogMeansCurrent=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&failOverReadOnly=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=CONVERT_TO_NULL + username: root + password: local + +# macOS-friendly temp path (was D:/xlyweberp/ai/ocrtmp) +ocr: + tmpPath: /Users/reporkey/Desktop/saas-8s+/tempPath/ocrtmp + +# LLM 可观测(Langfuse,架构 §1)。默认关闭;自托管起来后填 key 开启。 +# 自托管:docker compose -f docker-compose.langfuse.yml up -d → http://localhost:3000 拿 key。 +langfuse: + enabled: false + host: http://localhost:3000 + public-key: "" + secret-key: "" -- libgit2 0.22.2