From f8771f528ee06802df487cb30d259273faaa34ca Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 20 Mar 2025 19:36:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E9=85=8D=E7=BD=AE=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=20"standard"=20=E4=BF=AE=E6=94=B9=E4=B8=BA=20"std"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- build/default/omc.conf | 4 ++-- build/default/omc.yaml | 6 +++--- local/omc.yaml | 7 +++++-- src/config/config.default.yaml | 8 ++++---- src/config/config.local.yaml | 4 ++-- src/config/config.prod.yaml | 4 ++-- src/modules/open_api/open_api.go | 12 ++++++++++++ 8 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 src/modules/open_api/open_api.go diff --git a/README.md b/README.md index b886e491..b36fbf4c 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ sudo bash /usr/local/etc/omc/script/setup.sh -u # Deb sudo dpkg -r omc -sudo M_PARAM=standard C_PARAM=agt dpkg -i omc-r2.2503.2-20250320-ubuntu-amd64.deb +sudo M_PARAM=std C_PARAM=agt dpkg -i omc-r2.2503.2-20250320-ubuntu-amd64.deb sudo M_PARAM=lite C_PARAM=agt dpkg -i omc-r2.2503.2-20250320-ubuntu-amd64.deb # Rpm @@ -130,9 +130,9 @@ INSERT INTO cdr_event_smsc_bak SELECT * FROM cdr_event_smsc WHERE TIMESTAMP <= 1 DELETE FROM cdr_event_smsc WHERE TIMESTAMP <= 1739540000 # 执行数据库脚本 -./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/standard/common --sqlSource standard -./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/standard/install --sqlSource standard -./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/standard/upgrade/upg_sys_dict_data.sql --sqlSource standard +./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/std/common --sqlSource std +./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/std/install --sqlSource std +./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/std/upgrade/upg_sys_dict_data.sql --sqlSource std ./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/lite/common --sqlSource lite ./omc.exe -c ./local/omc.yaml --sqlPath ./build/linux/usr/local/etc/omc/database/lite/install --sqlSource lite diff --git a/build/default/omc.conf b/build/default/omc.conf index 1bd47880..a024bba6 100644 --- a/build/default/omc.conf +++ b/build/default/omc.conf @@ -3,7 +3,7 @@ ### omc agt ba VENDORS=omc -### standard lite -MODE=standard +### std lite +MODE=std ## Other diff --git a/build/default/omc.yaml b/build/default/omc.yaml index 74924c25..6c823e8b 100644 --- a/build/default/omc.yaml +++ b/build/default/omc.yaml @@ -1,9 +1,9 @@ -# server version: standard/lite/tenant -serverVersion: "standard" +# server version: std/lite +serverVersion: "std" # database for server version database: - defaultDataSourceName: "standard" + defaultDataSourceName: "std" # file: log file name # level: /trace/debug/info/warn/error/fatal, default: debug diff --git a/local/omc.yaml b/local/omc.yaml index 40cea7e3..75598b8c 100644 --- a/local/omc.yaml +++ b/local/omc.yaml @@ -1,3 +1,6 @@ +# server version: std/lite +serverVersion: "std" + # file: log file name # level: /trace/debug/info/warn/error/fatal, default: debug # duration: rotation time with xx hours, example: 1/12/24 hours @@ -53,7 +56,7 @@ staticFile: database: dataSource: # Default database instance - standard: + std: type: "mysql" host: "192.168.9.58" port: 13306 @@ -67,7 +70,7 @@ database: database: "./local/omc_db.sqlite" logging: true # used to specify the default data source for multiple data resourece - defaultDataSourceName: "standard" + defaultDataSourceName: "std" # Redis data cache redis: diff --git a/src/config/config.default.yaml b/src/config/config.default.yaml index 7eeb29b9..4b379992 100644 --- a/src/config/config.default.yaml +++ b/src/config/config.default.yaml @@ -1,5 +1,5 @@ -# 运行版本 standard/lite/tenant -serverVersion: "standard" +# 运行版本 std/lite +serverVersion: "std" # 运行模式 system/docker serverMode: "system" # 登录认证,默认打开 @@ -147,7 +147,7 @@ jwt: database: dataSource: # 默认数据库实例 - standard: + std: type: "mysql" host: "127.0.0.1" port: 3306 @@ -161,7 +161,7 @@ database: database: "" logging: false # 多个数据源时可以用这个指定默认的数据源 - defaultDataSourceName: "standard" + defaultDataSourceName: "std" # Redis 缓存数据 redis: diff --git a/src/config/config.local.yaml b/src/config/config.local.yaml index e176b6ec..92189351 100644 --- a/src/config/config.local.yaml +++ b/src/config/config.local.yaml @@ -21,7 +21,7 @@ staticFile: database: dataSource: # 默认数据库实例 - standard: + std: type: "mysql" host: "127.0.0.1" port: 3306 @@ -35,7 +35,7 @@ database: database: "/usr/local/etc/omc/database/omc_db.sqlite" logging: true # 多个数据源时可以用这个指定默认的数据源 - defaultDataSourceName: "standard" + defaultDataSourceName: "std" # Redis 缓存数据 redis: diff --git a/src/config/config.prod.yaml b/src/config/config.prod.yaml index 40fd08b4..39fda875 100644 --- a/src/config/config.prod.yaml +++ b/src/config/config.prod.yaml @@ -2,7 +2,7 @@ database: dataSource: # 默认数据库实例 - standard: + std: type: "mysql" host: "127.0.0.1" port: 33066 @@ -16,7 +16,7 @@ database: database: "/usr/local/etc/omc/database/omc_db.sqlite" logging: false # 多个数据源时可以用这个指定默认的数据源 - defaultDataSourceName: "standard" + defaultDataSourceName: "std" # Redis 缓存数据 redis: diff --git a/src/modules/open_api/open_api.go b/src/modules/open_api/open_api.go new file mode 100644 index 00000000..aa882097 --- /dev/null +++ b/src/modules/open_api/open_api.go @@ -0,0 +1,12 @@ +package open_api + +import ( + "be.ems/src/framework/logger" + + "github.com/gin-gonic/gin" +) + +// 模块路由注册 +func Setup(router *gin.Engine) { + logger.Infof("开始加载 ====> open_api 模块路由") +}