From 26d98095f8128768de36b977bb32cfb7bb8f0456 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Wed, 9 Oct 2024 17:32:02 +0800 Subject: [PATCH] 1 --- app/hdl/hdl_comm.go | 4 ++-- app/hdl/hdl_set_center.go | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/hdl/hdl_comm.go b/app/hdl/hdl_comm.go index a66141d..995f99e 100644 --- a/app/hdl/hdl_comm.go +++ b/app/hdl/hdl_comm.go @@ -119,8 +119,8 @@ func MenuList(c *gin.Context) { // @Failure 400 {object} md.Response "具体错误" // @Router /api/comm/basicGet [GET] func GetBaseInfo(c *gin.Context) { - masterId := svc.GetMasterId(c) - engine := db.DBs[masterId] + masterId := "0" + engine := db.Db sysCfgDb := implement2.NewSysCfgDb(engine, masterId) res := sysCfgDb.SysCfgFindWithDb(enum.AppLogo, enum.AppName) diff --git a/app/hdl/hdl_set_center.go b/app/hdl/hdl_set_center.go index 31a9e82..78523d5 100644 --- a/app/hdl/hdl_set_center.go +++ b/app/hdl/hdl_set_center.go @@ -6,7 +6,6 @@ import ( "applet/app/enum" "applet/app/lib/validate" "applet/app/md" - "applet/app/svc" db "code.fnuoos.com/zhimeng/model.git/src" "github.com/gin-gonic/gin" ) @@ -31,8 +30,8 @@ func BasicSet(c *gin.Context) { e.OutErr(c, err1.Code, err1.Error()) return } - masterId := svc.GetMasterId(c) - engine := db.DBs[masterId] + masterId := "0" + engine := db.Db sysCfgDb := implement2.NewSysCfgDb(engine, masterId) sysCfgDb.SysCfgUpdate(enum.AppName, req.AppName) sysCfgDb.SysCfgUpdate(enum.AppLogo, req.AppLogo) @@ -51,9 +50,8 @@ func BasicSet(c *gin.Context) { // @Failure 400 {object} md.Response "具体错误" // @Router /api/setCenter/basicGet [GET] func BasicGet(c *gin.Context) { - masterId := svc.GetMasterId(c) - engine := db.DBs[masterId] - sysCfgDb := implement2.NewSysCfgDb(engine, masterId) + engine := db.Db + sysCfgDb := implement2.NewSysCfgDb(engine, "0") res := sysCfgDb.SysCfgFindWithDb(enum.AppLogo, enum.AppName) e.OutSuc(c, md.BasicSetResp{